Вы можете заархивировать его с помощью DbMigrator
и MigratorScriptingDecorator
:
var configuration = new Configuration();
var migrator = new DbMigrator(configuration);
//if you want to update database to latest migration
migrator.Update();
//if you want to get above update script without applying it to database
var scriptor = new MigratorScriptingDecorator(migrator);
var script = scriptor.ScriptUpdate(sourceMigration: null, targetMigration: null);