Esempio n. 1
0
        public PetColor DeletePetColor(int id)
        {
            var petColorForDeletion = FindPetColorwithID(id);

            if (petColorForDeletion == null)
            {
                throw new Exception(message: "Id could not be found, moron.");
            }
            return(_petColorRepo.DeletePetColor(petColorForDeletion));
        }
Esempio n. 2
0
        public PetColor DeletePetColor(int Id)
        {
            var toBeDeletedColor = FindPetColorById(Id);

            if (toBeDeletedColor == null)
            {
                throw new Exception(message: "Id not found");
            }
            return(_petColorRepo.DeletePetColor(toBeDeletedColor));
        }