public void Add(string fullName, string emailAddress, string passWord) { var hashedPassword = passwordSvc.Hash(passWord); var account = new AccountDetails() { FullName = fullName, EmailAddress = emailAddress, Password = hashedPassword }; createAccount.Create(account); }
public Account CreateAccount(string firstName, string secondName, string email, decimal balance, IAccountNumberGenerator generator, ICreateAccount creator) { //здесь подумать как передать какой именно аккаунт if (firstName == null) { throw new ArgumentNullException(nameof(firstName)); } if (secondName == null) { throw new ArgumentNullException(nameof(secondName)); } if (email == null) { throw new ArgumentNullException(nameof(email)); } string id = generator.GenerateAccountNumber(); Account acc = creator.Create(id, firstName, secondName, email, balance); repos.Save(acc); return(acc); }