FromProviderName() public static method

public static FromProviderName ( string providerName ) : DbConfig
providerName string
return DbConfig
Example #1
0
 /// <summary>
 /// Instantiate Db with connectionString and DbProviderName
 /// </summary>
 /// <param name="connectionString">The connection string</param>
 /// <param name="providerName">The ADO .Net Provider name. When not specified,
 /// the default value is used (see DefaultProviderName)</param>
 public Db(string connectionString, string providerName)
     : this(connectionString, DbConfig.FromProviderName(providerName), DbProviderFactories.GetFactory(providerName))
 {
 }
Example #2
0
 /// <summary>
 /// Instantiate Db with connectionString and DbProviderName
 /// </summary>
 /// <param name="connectionString">The connection string</param>
 /// <param name="providerName">The ADO .Net Provider name. When not specified,
 /// the default value is used (see DefaultProviderName)</param>
 public Db(string connectionString, string providerName)
     : this(connectionString, DbConfig.FromProviderName(providerName))
 {
 }