public ActionResult EditConfig(FormCollection values) { // Prevent saving of cached data. this.Config.Freshen(); try { UpdateModel(this.Config); this.Db.SubmitChanges(); } catch (Exception ex) { this.ModelState.AddModelError("Form", ex.Message); var model = new MasterConfigModel { AvailableThemes = this.GetAvailableThemes(false), AvailableTimezones = this.GetAvailableTimezones(false), Groups = this.Db.Roles.ToList(), }; return(View("EditConfig", model)); } // Makes config immediately available. this.Config.Invalidate(); return(RedirectToAction("Index")); }
public ActionResult EditConfig() { this.Config.Freshen(); var model = new MasterConfigModel { AvailableThemes = this.GetAvailableThemes(false), AvailableTimezones = this.GetAvailableTimezones(false), Groups = this.Db.Roles.ToList(), }; return(View("EditConfig", model)); }