public static IDbConnection GetIDbConnection ( DatabaseType databaseType, string connectionString ) { IAVSCDatabase db = AVSCDatabaseFactory.GetIAVSCDatabase( databaseType, connectionString); return(db.GetDbConnection()); }
public static IDbConnection GetIDbConnection ( DatabaseType databaseType, string serverName, string username, string password, string databaseName ) { IAVSCDatabase db = AVSCDatabaseFactory.GetIAVSCDatabase( databaseType, serverName, username, password, databaseName); return(db.GetDbConnection()); }
public static IAVSCDatabase GetIAVSCDatabase ( DatabaseType databaseType, string connectionString ) { IAVSCDatabase db = null; switch (databaseType) { case DatabaseType.Postgres: { db = new PostgresDbConnection(connectionString); } break; case DatabaseType.MySql: { db = new MySqlDbConnection(connectionString); } break; case DatabaseType.SqlServer: { db = new SqlServerDbConnection(connectionString); } break; default: { throw new NotSupportedDatabaseException(); } } return(db); }
public static IDbConnection GetInMemoryIDbConnection() { IAVSCDatabase db = AVSCDatabaseFactory.GetIAVSCInMemoryDatabase(); return(db.GetDbConnection()); }