protected void btnSnapshot_Click(object sender, EventArgs e)
        {
            string snapshotRoot = "~/uSync/Migrations";

            var snapshotMgr = new MigrationManager(snapshotRoot);
            var info = snapshotMgr.CreateMigration(txtSnapshotName.Text);

            if (info.FileCount == 0)
            {
                lbStatus.Text = "Migration contained no changes, so no folder has been created";
            }
            else
            {
                lbStatus.Text = "Migration created";
            }

            GetSnapShots();
        }
 protected void btnApplySnapshot_Click(object sender, EventArgs e)
 {
     var snapshotMgr = new MigrationManager("~/uSync/migrations");
     snapshotMgr.ApplyMigrations();
 }
 private void GetSnapShots()
 {
     var snapshotMgr = new MigrationManager("~/uSync/migrations");
     snapshotList.DataSource = snapshotMgr.ListMigrations();
     snapshotList.DataBind();
 }
Example #4
0
        protected void btnApplySnapshot_Click(object sender, EventArgs e)
        {
            var snapshotMgr = new MigrationManager("~/uSync/migrations");

            snapshotMgr.ApplyMigrations();
        }