예제 #1
0
        public void DepositAccount(BankAccount account, decimal deposit)
        {
            account.Deposit(deposit);
            BankAccountDTO accToUpdate = AccountMapper.AccountToDTO(account);

            _repository.UpdateAccount(accToUpdate);
        }
예제 #2
0
        public void WithdrawAccount(BankAccount account, decimal withdraw)
        {
            account.Withdraw(withdraw);
            BankAccountDTO accToUpdate = AccountMapper.AccountToDTO(account);

            _repository.UpdateAccount(accToUpdate);
        }
예제 #3
0
        public void CloseAccount(BankAccount account)
        {
            BankAccountDTO accToRemove = AccountMapper.AccountToDTO(account);

            _repository.RemoveAccount(accToRemove);
        }