public ItemsLinkContainer <VolunteerViewModel> Get() { var volunteers = _volunteerPageAppService.GetAll().ToList(); volunteers.ForEach(x => x.AddRangeLink(_volunteerPageEnricher.CreateLinks(Method.Get, x))); var result = new ItemsLinkContainer <VolunteerViewModel>() { Items = volunteers }; result.AddRangeLink(_volunteerPageEnricher.CreateLinks(Method.GetAll)); return(result); }
public IActionResult GetVolunteer(string language, string institution) { var volunteer = _volunteerAppService.GetInstitutionByLanguage(language, institution); volunteer?.AddRangeLink(_volunteerEnricher.CreateLinks(Method.Get, volunteer)); return(OkOrNotFound(volunteer)); }