public async Task <IActionResult> GetAllOrders()
        {
            var query  = new QueryGetAllOrders();
            var result = await _mediator.Send(query);

            return(Ok(result));
        }
Ejemplo n.º 2
0
        public async Task <List <Order> > Handle(QueryGetAllOrders request, CancellationToken cancellationToken)
        {
            List <Order> result = await storeQuery.GetAllOrders();

            return(result.Select(order => order).ToList());
        }