Beispiel #1
0
        // 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));
        }
Beispiel #2
0
        public IActionResult Shownews(int newsid)
        {
            var page = pageRepository.GetPageById(newsid);

            if (page != null)
            {
                page.PageVisit += 1;
                pageRepository.UpdatePage(page);
                pageRepository.Save();
            }
            return(View(page));
        }