/// <summary> /// Create a new account /// </summary> /// <param name="account">New account</param> /// <exception cref="ArgumentNullException"> /// <paramref name="account"/> is null. /// </exception> public void AddAccount(BankAccountDTO account) { if (account is null) { throw new ArgumentNullException(nameof(account)); } else if (account != null) { this.repository.Create(mapper.MapAccountToDTO(account)); } else { throw new Exception(nameof(account)); } SaveAccount(); }