public Pet CreatePet(Pet pet) { if (pet.Name == null) { throw new InvalidDataException("Pet must have a name"); } return(_petShopRepo.AddPet(pet)); }