public ItemsLinkContainer <HomeViewModel> Get() { var obj = _homeAppService.GetAll().ToList(); obj.ForEach(x => x.AddRangeLink(_homeEnricher.CreateLinks(Method.Get, x))); var result = new ItemsLinkContainer <HomeViewModel>() { Items = obj }; result.AddRangeLink(_homeEnricher.CreateLinks(Method.GetAll)); return(result); }
public IActionResult GetHome(string language, string institution) { var home = _homeAppService.GetInstitutionByLanguage(language, institution); home?.AddRangeLink(_homeEnricher.CreateLinks(Method.Get, home)); return(OkOrNotFound(home)); }