Beispiel #1
0
        public async Task <IActionResult> GetById([FromRoute] string idCliente)
        {
            try
            {
                var clientes = await _clienteBusiness.ConsultarPorId(idCliente).ConfigureAwait(false); //Todo: chamar a classe de Business

                if (clientes == null)
                {
                    return(NoContent());
                }

                return(Ok(clientes));
            }
            catch (Exception ex)
            {
                return(BadRequest(new { message = ex }));
            }
        }