Inheritance: IMigrationProvider
Esempio n. 1
0
        protected SimpleMigrator CreateMigrator(string name, params Type[] migrationTypes)
        {
            foreach (var migrationType in migrationTypes)
            {
                var setupMethod = migrationType.GetMethod("Setup", BindingFlags.Static | BindingFlags.Public);
                setupMethod.Invoke(null, new object[] { this.MigrationStringsProvider });
            }

            var migrationProvider = new CustomMigrationProvider(migrationTypes);
            var migrator          = new SimpleMigrator(migrationProvider, this.CreateDatabaseProvider(), new NUnitLogger(name));

            migrator.Load();
            return(migrator);
        }
Esempio n. 2
0
        protected SimpleMigrator CreateMigrator(string name, params Type[] migrationTypes)
        {
            foreach (var migrationType in migrationTypes)
            {
                var setupMethod = migrationType.GetMethod("Setup", BindingFlags.Static | BindingFlags.Public);
                setupMethod.Invoke(null, new object[] { this.MigrationStringsProvider });
            }

            var migrationProvider = new CustomMigrationProvider(migrationTypes);
            var migrator = new SimpleMigrator(migrationProvider, this.CreateDatabaseProvider(), new NUnitLogger(name));
            migrator.Load();
            return migrator;
        }