Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [AllowAnonymous]
- [Route("Post/{year:int}/{month:int}/{day:int}/{*title}")]
- [HttpGet]
- public Task<IActionResult> GetPostByDateTitle(int year, int month, int day, string title)
- {
- return this.GetPostByDate(year, month, day, 1);
- }
- [AllowAnonymous]
- [Route("Post/{year:int}/{month:int}/{day:int}/{dayId:int}/{*title}")]
- [HttpGet]
- public Task<IActionResult> GetPostByDateTitle(int year, int month, int day, int dayId, string title)
- {
- return this.GetPostByDate(year, month, day, dayId);
- }
- @if (Model.DayId == 1)
- {
- <a asp-controller="Post" asp-action="GetPostByDateTitle" asp-route-year="@Model.Year" asp-route-month="@Model.Month" asp-route-day="@Model.Day" asp-route-title="@LinkTitle(Model.Title)">link</a>
- }
- else
- {
- <a asp-controller="Post" asp-action="GetPostByDateTitle" asp-route-year="@Model.Year" asp-route-month="@Model.Month" asp-route-day="@Model.Day" asp-route-dayid="@Model.DayId" asp-route-title="@LinkTitle(Model.Title)">link</a>
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement