示例#1
0
 public ActionResult Deletar(long id)
 {
     try
     {
         _animalService.Deletar(id);
         return(Ok(new { mensagem = "Animal Removido" }));
     }
     catch (Exception e)
     {
         if (e.InnerException != null)
         {
             return(BadRequest(new { mensagem = e.InnerException.Message }));
         }
         return(BadRequest(new { mensagem = e.Message }));
     }
 }