public void Handle(TransferStarted e) { if (e.Amount > 10000) { var from = _querySearch.SelectAccountSummary(e.FromAccount); var to = _querySearch.SelectAccountSummary(e.ToAccount); var alert = $"Money transfer started: {e.Amount:c2} from {from.AccountCode} to {to.AccountCode}"; // var smtp = new SmtpClient(); // smtp.Send("*****@*****.**", "*****@*****.**", "Large Money Transfer", alert); } }
public void Handle(AccountClosed c) { var account = _search.SelectAccountSummary(c.AggregateIdentifier); _store.UpdateAccountStatus(account.AccountIdentifier, "Closed"); }