public async Task <List <Order> > Handle(GetPaidOrderQuery request, CancellationToken cancellationToken) { return(await this.repository .GetAll() .Where(x => x.OrderState == 2) .ToListAsync(cancellationToken)); }
public async Task <IEnumerable <Order> > Handle(GetPaidOrderQuery request, CancellationToken cancellationToken) { return(await _repository .GetAll() .Where(order => order.OrderState == eOrderState.Paid) .ToListAsync(cancellationToken)); }
public async Task <List <Order> > Handle(GetPaidOrderQuery request, CancellationToken cancellationToken) { return(await _orderRepository.GetPaidOrdersAsync(cancellationToken)); }