コード例 #1
0
        public override Task <Empty> SetupAppend(SetupRequest request, ServerCallContext context)
        {
            var loans = request.Loans.Select(l => mapper.Map <Repository.Loan>(l));

            loansRepository.SetupAppend(loans);
            return(Task.FromResult(new Empty()));
        }
コード例 #2
0
        public override Task <Empty> SetupAppend(SetupRequest request, ServerCallContext context)
        {
            var loans = request.Loans.Select(l => mapper.Map <Models.Loan>(l));

            loansRepository.SetupAppend(loans);
            projectionChannel.Publish(null, new DataProjection <Models.Loan, string> {
                Upsert = loans.ToArray()
            });
            return(Task.FromResult(new Empty()));
        }
コード例 #3
0
 public Task SetupAppend(MessageContext context, SetupAppendLoansEvent inputEvent)
 {
     loansRepository.SetupAppend(inputEvent.Loans);
     return(Task.CompletedTask);
 }