internal IDbConnection BuildAttachConnection(string filePath, string dbName) { string connectionString = DataUtil.BuildConnectionString(this._connectionOptions.ServerName, this._connectionOptions.UserName, this._connectionOptions.Password, filePath, this._connectionOptions.UseMainInstance, this._connectionOptions.ConnectionTimeout); if (!string.IsNullOrEmpty(dbName)) { connectionString = "Database=" + dbName + ";" + connectionString; } return(new SqlConnectionWrapper(new SqlConnection(connectionString))); }
internal IDbConnection BuildMasterConnection(bool useMainInstance) { return(new SqlConnectionWrapper(new SqlConnection(DataUtil.BuildConnectionString(this._connectionOptions.ServerName, this._connectionOptions.UserName, this._connectionOptions.Password, useMainInstance, this._connectionOptions.ConnectionTimeout)))); }
internal IDbConnection BuildAttachConnection(string filePath, int timeout) { return(new SqlConnectionWrapper(new SqlConnection(DataUtil.BuildConnectionString(this._connectionOptions.ServerName, this._connectionOptions.UserName, this._connectionOptions.Password, filePath, this._connectionOptions.UseMainInstance, timeout)))); }