Пример #1
0
 public ActionResult <PetType> Get(int id)
 {
     if (id < 1)
     {
         return(BadRequest("ID must be greater than 0"));
     }
     if (_petTypeService.GetPetTypeWithId(id) == null)
     {
         return(BadRequest("Could not find Pet Type with that ID"));
     }
     return(_petTypeService.GetPetTypeWithId(id));
 }