Exemplo n.º 1
0
        async public Task <IQueryable <Merchant> > Handle(GetAllMerchantsQuery request, CancellationToken cancellationToken)
        {
            var merchants = _merchantsRepository.GetMerchants(cancellationToken);

            return(merchants);
        }
Exemplo n.º 2
0
        async public Task <SingleResult> Handle(GetMerchantQuery request, CancellationToken cancellationToken)
        {
            var merchants = _merchantsRepository.GetMerchants(cancellationToken).Where(x => x.Id.Equals(request.MerchantId));

            return(SingleResult.Create(merchants));
        }