Exemplo n.º 1
0
        public IActionResult GetClient(int id, bool includeDogs = false)
        {
            var client = _clientInfoRepository.GetClient(id, includeDogs);

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

            if (includeDogs)
            {
                return(Ok(_mapper.Map <ClientDto>(client)));
            }

            return(Ok(_mapper.Map <ClientWithoutDogsDto>(client)));
        }