public async Task <List <Order> > Handle(GetOrderByCustomerGuidQuery request, CancellationToken cancellationToken) { return(await this.repository .GetAll() .Where(x => x.CustomerGuid == request.CustomerGuid) .ToListAsync(cancellationToken)); }
public async Task <List <Order> > Handle(GetOrderByCustomerGuidQuery request, CancellationToken cancellationToken) { return(await _orderRepository.GetOrderByCustomerGuidAsync(request.CustomerId, cancellationToken)); }