Skip to content

Commit

Permalink
Extended LoanApplication presentation sample
Browse files Browse the repository at this point in the history
  • Loading branch information
stidsborg committed Mar 19, 2024
1 parent d20afc3 commit 142dcef
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,11 @@ public override async Task Run(LoanApplication loanApplication)
.OfType<CreditCheckOutcome>()
.Take(3)
.Completion();

CommandAndEvents decision = DateTime.Now.Ticks % 2 == 0
? new LoanApplicationApproved(loanApplication)
: new LoanApplicationRejected(loanApplication);

await MessageBroker.Send(decision);
}
}

0 comments on commit 142dcef

Please sign in to comment.