コード例 #1
0
ファイル: DeleteAccountHandler.cs プロジェクト: mishrsud/Ximo
        public void Handle(DeleteAccount command)
        {
            var account = _accountStore.GetById(command.AccountId);

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

            account.Reinstate();
            _accountStore.Save(account);
        }
コード例 #3
0
        public void Handle(ApproveAccount command)
        {
            var account = _accountStore.GetById(command.AccountId);

            account.Approve(command.ApprovedBy);
            _accountStore.Save(account);
        }
コード例 #4
0
        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);
        }