Esempio n. 1
0
        public ServiceResult <string> AddAnimal(AnimalServiceModel animal)
        {
            var addResult = animalRepository.Add(animal.ConvertToModel());

            return(addResult.IsSuccess ? ServiceResult <string> .Success("success - add", "") : ServiceResult <string> .Failed(string.Empty, ""));
        }
Esempio n. 2
0
        public ServiceResult <string> UpdateAnimal(AnimalServiceModel animal)
        {
            var updateResult = animalRepository.Update(animal.ConvertToModel());

            return(updateResult.IsSuccess ? ServiceResult <string> .Success("Success - update", "") : ServiceResult <string> .Failed(string.Empty, ""));
        }