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;
        }
 private void DatabaseMigrator_MigrationCompleted(object sender, DbMigratorEventArgs e)
 {
     UpdateMigrationLists(e);
 }
 public virtual void OnMigrationCompleted(DbMigratorEventArgs e)
 {
     if (MigrationCompleted != null)
     {
         MigrationCompleted(this, e);
     }
 }