Ejemplo n.º 1
0
 private static async Task<DbConnection> CreateConnection(Config config)
 {
     DbProviderFactory providerFactory = DbProviderFactories.GetFactory(config.Connection.Type ?? "System.Data.SqlClient");
     DbConnection connection = providerFactory.CreateConnection();
     if (connection == null)
         throw new ApplicationException("Could not create a connection from the specified configuration.");
     connection.ConnectionString = config.Connection.ConnectionString;
     await connection.OpenAsync();
     return connection;
 }
Ejemplo n.º 2
0
 internal EntityCodeBuilder(DbConnection connection, Config config)
     : base(connection, config)
 {
 }
Ejemplo n.º 3
0
 internal CodeBuilder(DbConnection connection, Config config)
 {
     _connection = connection;
     Config = config;
 }