migratordotnet - Run migrations from within application (w/o nant or build)
问题 is there a way to run migrations from within the application itself? Thanks! 回答1: I instantiate an instance of the Migrator class, and then you can call member methods like MigrateToLastVersion() or MigrateTo(long versionnr) Migrator.Migrator m = new Migrator.Migrator ("SqlServer", connectionString, migrationsAssembly) m.MigrateToLastVersion(); 回答2: I don't see why not. Have a look at the nant task http://code.google.com/p/migratordotnet/source/browse/trunk/src/Migrator.NAnt/MigrateTask.cs