Ejemplo n.º 1
0
        public async Task <ActionResult> GetAsync()
        {
            try
            {
                var id      = ExtensionsController.GetId(this);
                var pedidos = await _pedidoBusiness.GetAsync(id);

                return(Ok(pedidos));
            }
            catch (ArgumentException ex)
            {
                return(StatusCode(400, ex.Message));
            }
            catch (Exception ex)
            {
                LogarErro(ex);
                return(StatusCode(500, "Internal server error"));
            }
        }