async public Task <IQueryable <Merchant> > Handle(GetAllMerchantsQuery request, CancellationToken cancellationToken) { var merchants = _merchantsRepository.GetMerchants(cancellationToken); return(merchants); }
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)); }