public ActionResult UpdateSettings(Setting setting) { using (var db = new edayRoomEntities()) { db.Settings.Attach(setting); db.ObjectStateManager.ChangeObjectState(setting, EntityState.Modified); db.SaveChanges(); } return RedirectToAction("Index"); }
/// <summary> /// Create a new Setting object. /// </summary> /// <param name="enableDashboard">Initial value of the enableDashboard property.</param> /// <param name="enableParticipacion">Initial value of the enableParticipacion property.</param> /// <param name="enableMovilizacion">Initial value of the enableMovilizacion property.</param> /// <param name="enableExitPoll">Initial value of the enableExitPoll property.</param> /// <param name="enableQuickCount">Initial value of the enableQuickCount property.</param> /// <param name="enableTotalizacion">Initial value of the enableTotalizacion property.</param> /// <param name="id">Initial value of the id property.</param> public static Setting CreateSetting(global::System.Boolean enableDashboard, global::System.Boolean enableParticipacion, global::System.Boolean enableMovilizacion, global::System.Boolean enableExitPoll, global::System.Boolean enableQuickCount, global::System.Boolean enableTotalizacion, global::System.Int32 id) { Setting setting = new Setting(); setting.enableDashboard = enableDashboard; setting.enableParticipacion = enableParticipacion; setting.enableMovilizacion = enableMovilizacion; setting.enableExitPoll = enableExitPoll; setting.enableQuickCount = enableQuickCount; setting.enableTotalizacion = enableTotalizacion; setting.id = id; return setting; }
/// <summary> /// Deprecated Method for adding a new object to the Settings EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToSettings(Setting setting) { base.AddObject("Settings", setting); }