Example #1
0
        public void Handle(DeleteAccount command)
        {
            var account = _accountStore.GetById(command.AccountId);

            account.Delete(command.Reason);
            _accountStore.Save(account);
        }
Example #2
0
        public void Handle(ReinstateAccount command)
        {
            var account = _accountStore.GetById(command.AccountId);

            account.Reinstate();
            _accountStore.Save(account);
        }
Example #3
0
        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);
        }