Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        public IActionResult GetVolunteer(string language, string institution)
        {
            var volunteer = _volunteerAppService.GetInstitutionByLanguage(language, institution);

            volunteer?.AddRangeLink(_volunteerEnricher.CreateLinks(Method.Get, volunteer));
            return(OkOrNotFound(volunteer));
        }