Example #1
0
 public ActionResult <PetType> Get(int id)
 {
     try
     {
         PetType theType = _petTypeService.FindPetTypeByIdWithPets(id);
         if (theType == null)
         {
             return(NotFound("I am sorry could not find a type with that Id."));
         }
         else
         {
             return(Ok(theType));
         }
     }
     catch (Exception e)
     {
         return(StatusCode(500, e.Message));
     }
 }