/// <summary> /// Get the default connection /// </summary> /// <param name="databaseName">Name of the database to get the default connection from</param> /// <returns></returns> public System.Data.Common.DbConnectionStringBuilder RequestDefaultConnection(string databaseName, string projectName = "") { DbConnectionStringBuilder dbStringBuilder = new DbConnectionStringBuilder(false); dbStringBuilder.ConnectionString = PostgreSQLDatabase.BuildDefaultConnectionString(databaseName); return(dbStringBuilder); }
/// <summary> /// Create an instance of database object /// </summary> /// <param name="connectionStringBuilder">A connection string builder which contains the connection string</param> /// <returns>IDbDriver instance</returns> public IDbDriver CreateDatabaseObject(System.Data.Common.DbConnectionStringBuilder connectionStringBuilder) { IDbDriver instance = new PostgreSQLDatabase(); instance.ConnectionString = connectionStringBuilder.ConnectionString; return instance; }
/// <summary> /// Create an instance of database object /// </summary> /// <param name="connectionStringBuilder">A connection string builder which contains the connection string</param> /// <returns>IDbDriver instance</returns> public IDbDriver CreateDatabaseObject(System.Data.Common.DbConnectionStringBuilder connectionStringBuilder) { IDbDriver instance = new PostgreSQLDatabase(); instance.ConnectionString = connectionStringBuilder.ConnectionString; return(instance); }