public ActionResult <bool> DeletePet(int petId) { try { return(Ok(_petService.DeletePet(petId))); } catch (NotFoundException ex) { return(NotFound(ex.Message)); } catch (Exception ex) { return(StatusCode(StatusCodes.Status500InternalServerError, $"Something happend: {ex.Message}")); } }
public IActionResult DeletePet(int id) { _petServices.DeletePet(id); return(NoContent()); }