Exemple #1
0
        public async Task <IActionResult> GetAsync(int IdCliente)
        {
            Response <ClienteDTO> response = new Response <ClienteDTO>();

            try
            {
                response = await _clienteApplication.GetAsync(IdCliente);

                if (response.IsSuccess)
                {
                    return(Ok(response));
                }
                else
                {
                    return(BadRequest(response));
                }
            }
            catch (Exception ex)
            {
                response.Data      = null;
                response.IsSuccess = false;
                response.Message   = ex.Message;

                return(BadRequest(response));
            }
        }