// Methods protected Database(DatabaseSetting setting) { if (setting == null) { throw Error.ArgumentNull("setting"); } this._setting_ = setting; }
public static Database Create(DatabaseSetting setting) { if (setting == null) { throw Error.ArgumentNull("setting"); } switch (setting.DatabaseType) { case DatabaseType.SqlClient: return new SqlDatabase(setting); case DatabaseType.OracleClient: return new OracleDatabase(setting); } return null; }
public static Database Create(DatabaseSetting setting) { if (setting == null) { throw Error.ArgumentNull("setting"); } switch (setting.DatabaseType) { case DatabaseType.SqlClient: return(new SqlDatabase(setting)); case DatabaseType.OracleClient: return(new OracleDatabase(setting)); } return(null); }