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)); }
public async Task <ActionResult> GetOrdersAsync() { try { var order = await _orderQueries.GetOrdersAsync(); return(Ok(order)); } catch (Exception ex) { return(new InternalServerErrorObjectResult(ex.Message)); } }
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())); }
public async Task <IEnumerable <OrderDto> > GetByState([FromRoute] OrderState state, CancellationToken cancellationToken = default) { return(await _orderQueries.GetOrdersAsync(_ajkaShopDbContext, state, cancellationToken).ConfigureAwait(false)); }
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); }