Esempio n. 1
0
        public async Task <IActionResult> DeleteBreed(int?id)
        {
            if (id == null)
            {
                return(StatusCode(404, "Breed not Found"));
            }

            var breed = await _specieRepository.GetBreedByIdAsync(id.Value);

            if (breed == null)
            {
                return(StatusCode(404, "Breed not Found"));
            }

            var specialityId = await _specieRepository.DeleteBreedAsync(breed);

            return(StatusCode(200, "Breed Successfully Deleted"));
        }