public void When(ClientPassedAway @event) { try { AccountNumber accountNumber = accountNumberService.GetAccountNumberForClient(@event.ClientId); if (accountNumber.IsEmpty()) { return; } Account account = accountRepository.Get(accountNumber); account.Cancel(); accountRepository.Save(account); unitOfWork.Commit(); } catch (Exception ex) { HandleException(ex); } }
void IHandleClientStateTransitions.When(ClientPassedAway @event) { isDeceased = true; }
public void When(ClientPassedAway @event) { var clientView = FetchClientView(@event.ClientId); clientView.IsDeceased = true; }
public void When(ClientPassedAway @event) { var clientModel = FetchModel(@event.ClientId); clientModel.IsDeceased = true; Logger.Verbose(@event.ToString()); }