public DalConfig(System.Data.Common.DbProviderFactory factory, GetConnectionString_t getConnectionString) { this.GetConnectionString = getConnectionString; this.ProviderFactory = factory; this.ProviderFactoryType = this.ProviderFactory.GetType(); this.ProviderName = this.ProviderFactoryType.Namespace; this.ConnectionString = getConnectionString(this); }
public void SetConnectionStrings(params string[] connectionStrings) { if (connectionStrings == null) { return; } if (connectionStrings.Length > 1) { this.m_connectionCount = connectionStrings.Length; this.m_connectionStrings = connectionStrings; this.m_GetInternalConnectionString = GetConnectionStringFromArray; } else if (connectionStrings.Length == 1) { this.m_connectionString = connectionStrings[0]; this.m_GetInternalConnectionString = GetScalarConnectionString; } else { throw new System.InvalidOperationException("SqlFactory needs at least one connection string"); } }
public DalConfig(GetConnectionString_t getConnectionString) : this(defaultFactory, getConnectionString) { }
public DalConfig(string providerName, GetConnectionString_t getConnectionString) : this(TypeFromProvider(providerName), getConnectionString) { }
public DalConfig(System.Type t, GetConnectionString_t getConnectionString) : this(GetFactory(t), getConnectionString) { }