コード例 #1
0
        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();
        }
コード例 #2
0
 protected void btnApplySnapshot_Click(object sender, EventArgs e)
 {
     var snapshotMgr = new MigrationManager("~/uSync/migrations");
     snapshotMgr.ApplyMigrations();
 }
コード例 #3
0
 private void GetSnapShots()
 {
     var snapshotMgr = new MigrationManager("~/uSync/migrations");
     snapshotList.DataSource = snapshotMgr.ListMigrations();
     snapshotList.DataBind();
 }
コード例 #4
0
        protected void btnApplySnapshot_Click(object sender, EventArgs e)
        {
            var snapshotMgr = new MigrationManager("~/uSync/migrations");

            snapshotMgr.ApplyMigrations();
        }