public ActionResult Edit(ContentSecurity contentsecurity) { if (ModelState.IsValid) { db.ContentSecurities.Attach(contentsecurity); db.ObjectStateManager.ChangeObjectState(contentsecurity, EntityState.Modified); db.SaveChanges(); return RedirectToAction("Details", new { id = 1 }); } return View(contentsecurity); }
/// <summary> /// Deprecated Method for adding a new object to the ContentSecurities EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToContentSecurities(ContentSecurity contentSecurity) { base.AddObject("ContentSecurities", contentSecurity); }
/// <summary> /// Create a new ContentSecurity object. /// </summary> /// <param name="securityID">Initial value of the SecurityID property.</param> public static ContentSecurity CreateContentSecurity(global::System.Int32 securityID) { ContentSecurity contentSecurity = new ContentSecurity(); contentSecurity.SecurityID = securityID; return contentSecurity; }