public IActionResult GetDogs(int clientId, int id) { if (!_clientInfoRepository.ClientExists(clientId)) { return(NotFound()); } var dog = _clientInfoRepository.GetDogForClient(clientId, id); if (dog == null) { return(NotFound()); } return(Ok(_mapper.Map <DogDto>(dog))); }