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