public override Task <GetAccountsResponse> GetUserAccounts(GetUserAccountsRequest request, ServerCallContext context)
        {
            var accounts = accountsRepository.GetByUser(request.UserId).Select(account => mapper.Map <Account>(account));

            return(Task.FromResult(new GetAccountsResponse {
                Accounts = { accounts }
            }));
        }
Exemplo n.º 2
0
        public Task GetUserAccounts(MessageContext context, GetUserAccountsEvent inputEvent)
        {
            var accounts = accountsRepository.GetByUser(inputEvent.UserId);

            publishingRouter.Publish(context.ReplyTo, new SelectedAccountsEvent {
                Accounts = accounts
            }, context.FlowId);
            return(Task.CompletedTask);
        }