Beispiel #1
0
        public async Task <IActionResult> GetOrders()
        {
            var orders = await _orderQueries
                         .GetOrdersAsync();

            return(Ok(orders));
        }
        public async Task <IActionResult> OrdersByUser(string userId)
        {
            var orderTask = _orderQueries.GetOrdersAsync(userId);

            var orders = await orderTask;

            return(Ok(orders));
        }
Beispiel #3
0
        public async Task <ActionResult> GetOrdersAsync()
        {
            try
            {
                var order = await _orderQueries.GetOrdersAsync();

                return(Ok(order));
            }
            catch (Exception ex)
            {
                return(new InternalServerErrorObjectResult(ex.Message));
            }
        }
Beispiel #4
0
        public async Task <ActionResult <PagedResponseWrapper> > GetWaitingForShootingOrdersAsync([FromQuery] PagingParameters pagingParameters)
        {
            var orders = await _orderQueries.GetOrdersAsync(OrderStage.Shooting, pagingParameters);

            return(Ok(PagedResponseWrapper.CreateOkPagedResponseWrapper(orders)));
        }
 public async Task <ActionResult <IEnumerable <OrderViewModel> > > Get()
 {
     return(Ok(await _queries.GetOrdersAsync()));
 }
Beispiel #6
0
 public async Task <IEnumerable <OrderDto> > GetByState([FromRoute] OrderState state, CancellationToken cancellationToken = default)
 {
     return(await _orderQueries.GetOrdersAsync(_ajkaShopDbContext, state, cancellationToken).ConfigureAwait(false));
 }
Beispiel #7
0
        public async Task <ActionResult <IEnumerable <Order> > > GetOrdersAsync()
        {
            var orders = await _orderQueries.GetOrdersAsync();

            return(Ok(orders));
        }
        public async Task <IEnumerable <Order> > Get()
        {
            var orderCollection = await _orderQueries.GetOrdersAsync();

            return(orderCollection);
        }