public ActionResult Index() { if (!DataSettingsHelper.DatabaseIsInstalled()) return RedirectToRoute("Install"); var model = new UpgradeModel(); model.ApplicationVersion = GrandVersion.CurrentVersion; model.DatabaseVersion = _upgradeService.DatabaseVersion(); return View(model); }
public ActionResult Index(UpgradeModel m) { var model = new UpgradeModel(); model.ApplicationVersion = GrandVersion.CurrentVersion; model.DatabaseVersion = _upgradeService.DatabaseVersion(); if (model.ApplicationVersion != model.DatabaseVersion) { _upgradeService.UpgradeData(model.DatabaseVersion, model.ApplicationVersion); } model.ApplicationVersion = GrandVersion.CurrentVersion; model.DatabaseVersion = _upgradeService.DatabaseVersion(); return View(model); }