public IViewComponentResult Invoke() { var brands = _homeRepository.GetBrands(); var model = _mapper.Map <IEnumerable <Brand>, IEnumerable <BrandViewModel> >(brands); return(View(model)); }
//About Page View Model public IActionResult About() { var model = new AboutUsViewModel { Settings = _homeRepository.SingleSetting(), Agents = _homeRepository.GetAgents(), Brands = _homeRepository.GetBrands(), AboutUs = _homeRepository.GetSingleAbout() }; return(View(model)); }