public async Task <AboutUsViewModel> GetAboutUs(CancellationToken cancellationToken) { return(new AboutUsViewModel { AboutUs = await _aboutUsRepository.GetAboutUs(cancellationToken) }); }
public IViewComponentResult Invoke() { var aboutUs = _aboutUsRepository.GetAboutUs(); var model = _mapper.Map <IEnumerable <AboutUs>, IEnumerable <AboutUsViewModel> >(aboutUs); return(View(model)); }