Beispiel #1
0
        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));
        }
Beispiel #2
0
 public void Delete(int id)
 {
     try
     {
         _petTypeService.DeleteType(id);
     }
     catch (Exception e)
     {
         StatusCode(500, e.Message);
     }
 }