public void Handle(DeleteAccount command) { var account = _accountStore.GetById(command.AccountId); account.Delete(command.Reason); _accountStore.Save(account); }
public void Handle(ReinstateAccount command) { var account = _accountStore.GetById(command.AccountId); account.Reinstate(); _accountStore.Save(account); }
public void Handle(ApproveAccount command) { var account = _accountStore.GetById(command.AccountId); account.Approve(command.ApprovedBy); _accountStore.Save(account); }
public void Handle(UpdateAccountAddress command) { var account = _accountStore.GetById(command.AccountId); account.ChangeAddress(command.AddressLine1, command.AddressLine2, command.City, command.Postcode, command.State, command.CountryName); _accountStore.Save(account); }