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));
        }
Exemplo n.º 2
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));
        }