Exemple #1
0
 public IActionResult ObterPorId(int id)
 {
     try
     {
         return(Ok(_servico.ObterPorID(id)));
     }
     catch (ArgumentException ex)
     {
         return(NotFound(ex));
     }
     catch (Exception ex)
     {
         return(BadRequest(ex));
     }
 }