public ActionResult Edit(Setting setting) { if (ModelState.IsValid) { db.Settings.Attach(setting); db.Entry(setting).Property(p => p.RawValue).IsModified = true; db.SaveChanges(); return this.RestoreReferrer() ?? RedirectToAction("Index"); } return View(setting); }
public static Setting GetSetting(DisplayMonkeyEntities _db, Setting.Keys _id) { Guid key = _keyGuids[(int)_id]; return _db.Settings.FirstOrDefault(s => s.Key == key); }
protected override void init(DisplayMonkeyEntities _db) { base.init(_db); this.CacheInterval = Setting.GetDefaultCacheInterval(_db, this.FrameType); }