public void AddUser(string username, string password, EmployeeBase employeeType) { if (CheckIfExist(username)) { throw new UserAlreadyExistException(username); } else { _users.Add(new User(username, password, employeeType)); } }
public User(string username, string password, EmployeeBase employeeType) { Username = username; PasswordValidator = new PasswordValidator(password); EmployeeType = employeeType; }