/// <summary> /// You must call <see cref="ChangeConnectionString"/> to set the connection /// </summary> public SqlDataConnect(SqlDatabaseType type) { _DatabaseType = type; switch (_DatabaseType) { case SqlDatabaseType.SqlServer: _ConDb = new SqlConnection(); _CmdSql = new SqlCommand(); break; case SqlDatabaseType.MySql: _ConDb = new MySqlConnection(); _CmdSql = new MySqlCommand(); break; case SqlDatabaseType.Oracle: _ConDb = new OracleConnection(); _CmdSql = new OracleCommand(); break; case SqlDatabaseType.Postgres: _ConDb = new NpgsqlConnection(); _CmdSql = new NpgsqlCommand(); break; default: throw new ArgumentOutOfRangeException(); } _BolTran = false; }
/// <summary> /// Instantiates SqlDataConnect class /// </summary> public SqlDataAccess(SqlDatabaseType type) { SqlDataConnect = new SqlDataConnect(type); }
public SqlDatabaseAttribute(SqlDatabaseType sqlDatabaseType) { SqlDatabaseType = sqlDatabaseType; }