public IActionResult GetAdoptions()
        {
            var adoptionEntities = _animalInfoRepository.GetAdoptions();
            var results          = Mapper.Map <IEnumerable <AdoptionDto> >(adoptionEntities);

            return(Ok(results));
        }
        private void DeleteRelatedAdoptions(int animalId)
        {
            var relatedAdoptions = _animalInfoRepository.GetAdoptions().Where(adoption => adoption.AnimalId == animalId);

            foreach (var adoption in relatedAdoptions)
            {
                _animalInfoRepository.DeleteAdoption(adoption);
            }
        }