public void RemoveAccount(Account account) { if (!this.accountRegistry.ContainsKey(account.IBAN)) { throw new ApplicationException("Account does not exist!"); } this.accountRegistry.Remove(account.IBAN); }
public void AddAccount(Account account) { if (this.accountRegistry.ContainsKey(account.IBAN)) { throw new ApplicationException("Trying to add an account that already extists!"); } this.accountRegistry[account.IBAN] = account; }