public async Task <IActionResult> Index() { var skills = await _skillService.GetAll(); var sliders = await _homePageSliderService.GetAll(); var messages = await _messageService.GetAll(); var educations = await _educationService.GetAll(); var experiences = await _experienceService.GetAll(); var interesteds = await _interestedService.GetAll(); var articles = await _articleService.GetAll(); var categories = await _categoryService.GetAll(); ViewBag.SkillCount = skills.Data.Skills.Count; ViewBag.SliderCount = sliders.Data.HomePageSliders.Count; ViewBag.MessageCount = messages.Data.Messages.Count; ViewBag.EducationCount = educations.Data.Educations.Count; ViewBag.ExperienceCount = experiences.Data.Experiences.Count; ViewBag.InterestedCount = interesteds.Data.Interesteds.Count; ViewBag.ArticleCount = articles.Data.Articles.Count; ViewBag.CategoryCount = categories.Data.Categories.Count; return(View()); }
public async Task <IActionResult> Index() { var sliders = await _homePageSliderService.GetAll(); if (sliders.ResultStatus == ResultStatus.Success) { return(View(sliders.Data)); } if (sliders.ResultStatus == ResultStatus.Error) { return(NotFound()); } return(View()); }
// GET: Admin/HomePageSlider public ActionResult Index() { return(View(service.GetAll(x => x.Id > 0))); }