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

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

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