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