public static DatabaseCreator FromConnectionStringSettings(DatabaseDefinition databaseDefinition, NamedConnectionString connectionString, Context context)
        {
            var generator = SqlGeneratorFactory.CreateGenerator(connectionString.GetSqlEngineVersion(), context);
            var executer  = SqlExecuterFactory.CreateSqlExecuter(connectionString, generator);

            return(new DatabaseCreator(databaseDefinition, executer));
        }
        public static SqlStatementExecuter CreateSqlExecuter(NamedConnectionString connectionString, Context context)
        {
            var sqlEngineVersion = connectionString.GetSqlEngineVersion();

            var generator = SqlGeneratorFactory.CreateGenerator(sqlEngineVersion, context);

            return(CreateSqlExecuter(connectionString, generator));
        }
示例#3
0
        public static DatabaseMigrator FromConnectionStringSettings(NamedConnectionString connectionString, Context context)
        {
            var sqlEngineVersion = connectionString.GetSqlEngineVersion();

            var generator          = SqlGeneratorFactory.CreateGenerator(sqlEngineVersion, context);
            var migrationGenerator = SqlGeneratorFactory.CreateMigrationGenerator(sqlEngineVersion, context);
            var executer           = SqlExecuterFactory.CreateSqlExecuter(connectionString, generator);

            return(new DatabaseMigrator(executer, migrationGenerator));
        }