public void Deposit(BankAccount account, decimal amount, string description)
 {
     if (!_transactions.ContainsKey(account.AccountNumber))
     {
         _transactions.Add(account.AccountNumber, new List<Transaction>());
     }
     var transaction = new Transaction { AccountNumber = account.AccountNumber, Amount = amount, Description = description };
     _transactions[account.AccountNumber].Add(transaction);
 }
 public void Withdraw(BankAccount account, decimal amount, string description)
 {
     if (!_transactions.ContainsKey(account.AccountNumber))
     {
         _transactions.Add(account.AccountNumber, new List<Transaction>());
     }
     if (Balance(account) < amount)
     {
         throw new InsufficientFundsException(account.AccountNumber, amount);
     }
     var transaction = new Transaction { AccountNumber = account.AccountNumber, Amount = -amount, Description = description };
     _transactions[account.AccountNumber].Add(transaction);
 }