public override Task <GetTransactionsResult> Get(GetTransactionsRequest request, ServerCallContext context)
        {
            var transactions = request.Ids.Select(id => transactionsRepository.Get(id))
                               .Where(transaction => transaction != null)
                               .Select(transaction => mapper.Map <Transaction>(transaction))
                               .ToArray();

            return(Task.FromResult(new GetTransactionsResult {
                Transactions = { transactions }
            }));
        }
Пример #2
0
        public Task Get(MessageContext context, GetTransactionsEvent inputEvent)
        {
            var transactions = inputEvent.Ids.Select(id => transactionsRepository.Get(id))
                               .Where(transaction => transaction != null)
                               .ToArray();

            publishingRouter.Publish(context.ReplyTo, new SelectedTransactionsEvent {
                Transactions = transactions
            }, context.FlowId);
            return(Task.CompletedTask);
        }
Пример #3
0
 internal IEnumerable <Transaction> Get(string userId)
 {
     return(_repo.Get(userId));
 }
        public async Task <List <Transactions> > GetTransactions(string accountNumber)
        {
            var transactions = await transactionsRepository.Get(accountNumber);

            return(transactions);
        }