コード例 #1
0
 public virtual void OnMigrationCompleted(DbMigratorEventArgs e)
 {
     if (MigrationCompleted != null)
     {
         MigrationCompleted(this, e);
     }
 }
コード例 #2
0
        private void UpdateMigrationLists(DbMigratorEventArgs e)
        {
            lbPending.DataSource  = e.PendingMigrations;
            btnMigrateSql.Enabled = e.PendingMigrations.Any();
            btnMigrate.Enabled    = btnMigrateSql.Enabled;

            lbCompleted.DataSource      = e.CompletedMigrations;
            btnRollbackSql.Enabled      = e.CompletedMigrations.Any();
            btnRollback.Enabled         = btnRollbackSql.Enabled;
            btnMigrationHistory.Enabled = btnRollbackSql.Enabled;
        }
コード例 #3
0
 private void DatabaseMigrator_MigrationCompleted(object sender, DbMigratorEventArgs e)
 {
     UpdateMigrationLists(e);
 }