예제 #1
0
 public ActionResult Put(int id, Empresa empresa)
 {
     try
     {
         return(Ok(_service.Update(empresa, id)));
     }
     catch (NotFoundException)
     {
         return(NotFound("Empresa não encontrada!"));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }