Esempio n. 1
0
 public async Task <ActionResult <VolunteerDTO> > GetVolunteerAsync(int id)
 {
     try
     {
         return(Ok(await volunteerService.GetAsync(new VolunteerDTO {
             Id = id
         })));
     }
     catch (NotFoundException e)
     {
         return(NotFound(new { Id = id, e.Message }));
     }
 }