// GET: Admin/Pages/Details/5 public async Task <IActionResult> Details(int?id) { if (id == null) { return(NotFound()); } var page = _pageRepoitory.GetPageById(id.Value); if (page == null) { return(NotFound()); } return(View(page)); }
public IActionResult ShowNews(int newsId) { var page = pageRepoitory.GetPageById(newsId); if (page != null) { page.PageVisit += 1; pageRepoitory.UpdatePage(page); pageRepoitory.Save(); } return(View(page)); }