Пример #1
0
        public IActionResult GetCliente(Guid id)
        {
            var clienteFromRepo = _clientesRepository.GetCliente(id);

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

            var cliente = Mapper.Map <ClienteResponse>(clienteFromRepo);

            var links = CreateLinksForCliente(id);

            var response = new Halcyon.HAL.HALResponse(cliente)
                           .AddLinks(links);

            return(Ok(response));
        }
Пример #2
0
 public Cliente GetCliente(int idCliente)
 {
     return(clientesRepository.GetCliente(idCliente));
 }