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())); }
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())); }
public Task SetupAppend(MessageContext context, SetupAppendLoansEvent inputEvent) { loansRepository.SetupAppend(inputEvent.Loans); return(Task.CompletedTask); }