public ActionResult <PetType> Delete(int id) { var type = _typeService.DeleteType(id); if (type == null) { return(StatusCode(404, $"Type with id {id} not found")); } return(StatusCode(202, type)); }
public void Delete(int id) { try { _petTypeService.DeleteType(id); } catch (Exception e) { StatusCode(500, e.Message); } }