Beispiel #1
0
        public async Task <IActionResult> Index()
        {
            var VM = new DefaultIndexViewModel();

            VM.TotalArticles = await cms.CountAsync(0);

            VM.TotalPages = await cms.CountAsync(1);

            VM.TotalComments = await coms.CountAsync();

            VM.Comments = await coms.GetPageListAsync(1, 5);

            return(View(VM));
        }