public async Task <IViewComponentResult> InvokeAsync(long personID) { var viewModel = new List <LinkViewModel>(); var response = _linkService.Where(x => x.PersonID == personID); if (response.IsSuccess) { foreach (var item in response.Content) { viewModel.Add(_mapper.Map <LinkViewModel>(item)); } } return(await Task.FromResult((IViewComponentResult)View("Links", viewModel))); }