public ActionResult <TypePet> Delete(int id) { try { var typeToDelete = _typePetService.Delete(id); if (typeToDelete == null) { return(NotFound()); } return(Accepted(typeToDelete)); } catch (System.Exception) { return(StatusCode(500, "Error when deleting pet type")); } }
public ActionResult <TypePet> Delete(int id) { return(_typePetService.Delete(id)); }