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 interesteds = await _interestedService.GetAll(); if (interesteds.ResultStatus == ResultStatus.Error) { return(NotFound()); } if (interesteds.ResultStatus == ResultStatus.Success) { return(View(interesteds.Data)); } return(NotFound()); }