예제 #1
0
 /// <summary>
 /// Create using a connection string and provider name
 /// </summary>
 /// <param name="connectionString">The connection string</param>
 /// <param name="provider">The database provider name</param>
 public MicrOrmConnectionProvider(string connectionString, string provider)
 {
     if (string.IsNullOrEmpty(connectionString)) throw new ArgumentException("Connection string not supplied", "connectionString");
       if (string.IsNullOrEmpty(provider)) throw new ArgumentException("Provider name not not supplied", "provider");
       ConnectionInfo = new DbConnectionInfo { ConnectionString = connectionString, Provider = provider };
 }
예제 #2
0
 /// <summary>
 /// Create using a named connection string setting from the application configuration file
 /// </summary>
 /// <param name="connectionStringName">The name of the connection string in the application configuration file</param>
 public MicrOrmConnectionProvider(string connectionStringName)
 {
     ConnectionInfo = new DbConnectionInfo {ConnectionStringName = connectionStringName};
 }