예제 #1
0
        public IActionResult DeleteDogInformation(int clientId, int id)
        {
            if (!_clientInfoRepository.ClientExists(clientId))
            {
                return(NotFound());
            }

            var dogEntity = _clientInfoRepository
                            .GetDogForClient(clientId, id);

            if (dogEntity == null)
            {
                return(NotFound());
            }

            _clientInfoRepository.DeleteDogInformation(dogEntity);

            _clientInfoRepository.Save();

            return(NoContent());
        }