public SchemaBuilder(DbConnection connection, DbTransaction transaction, string tablePrefix) { _builder = SchemaBuilderFactory.For(connection); _dialect = SqlDialectFactory.For(connection); _tablePrefix = tablePrefix; Connection = connection; Transaction = transaction; }
public static ISchemaBuilder For(DbConnection connection) { string connectionName = connection.GetType().Name.ToLower(); if (!SchemaBuilders.ContainsKey(connectionName)) { throw new ArgumentException("Unknown connection name: " + connectionName); } var dialect = SqlDialectFactory.For(connection); return(SchemaBuilders[connectionName](dialect)); }