// GET: Admin/Home public ActionResult Index() { IndexViewModel model = new IndexViewModel(); model.BlogsCount = _blogManager.List().Count(); model.CategoriesCount = _categoryManager.List().Count(); model.UsersCount = _userRoleManager.GetUsersCount(); model.AuthorUserCount = _userRoleManager.GetAuthorUserCount(); model.BlogsLast5 = _blogManager.ListQueryable().OrderByDescending(x => x.CreatedOn).Take(5).ToList(); return(View(model)); }