Esempio n. 1
0
 public async Task <IActionResult> Find(Guid codigo)
 {
     try
     {
         return(Ok(_service.FindByCode(codigo)));
     }
     catch (ArgumentException ex)
     {
         return(NotFound(new Error(ex)));
     }
     catch (Exception ex)
     {
         return(StatusCode(500, new Error(ex)));
     }
 }