public ActionResult <Contractor> GetById(int id)
 {
     try
     {
         return(Ok(_service.GetById(id)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
Exemplo n.º 2
0
 public ActionResult <Contractor> GetById(int id)
 {
     try
     {
         return(Ok(_contractorsService.GetById(id)));
     }
     catch (System.Exception err)
     {
         return(BadRequest(err.Message));
     }
 }