Ejemplo n.º 1
0
 public Migration CreateMigration()
 {
     Migration mig = new Migration();
     // assign and the id
     mig.Id = DateTime.Now.Ticks;
     // copy over the model-table map if nessessary
     if (History.Count > 0)
     {
         foreach (var pair in History.Peek().ModelTableMap)
         {
             mig.ModelTableMap.Add(pair.Key, pair.Value);
         }
     }
     // add the migration to the top of the stack
     History.Push(mig);
     return mig;
 }
Ejemplo n.º 2
0
 public DatabaseOperation()
 {
     _migration = Globals.Settings.Migrations.CreateMigration();
     _migration.ClassFile = String.Format(migrationName, Globals.Settings.Names.Database);
 }