Example #1
0
 public async Task <ActionResult <VolunteerDTO> > CreateAsync([FromBody] VolunteerCreateDTO model)
 {
     try
     {
         return(Ok(await volunteerService.CreateAsync(model)));
     }
     catch (ValidationException e)
     {
         return(BadRequest(e.ValidationErrors));
     }
 }