Esempio n. 1
0
 public ActionResult Edit(ContentLegal contentlegal)
 {
     if (ModelState.IsValid)
     {
         db.ContentLegals.Attach(contentlegal);
         db.ObjectStateManager.ChangeObjectState(contentlegal, EntityState.Modified);
         db.SaveChanges();
         return RedirectToAction("Details", new { id = 1 });
     }
     return View(contentlegal);
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the ContentLegals EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToContentLegals(ContentLegal contentLegal)
 {
     base.AddObject("ContentLegals", contentLegal);
 }
 /// <summary>
 /// Create a new ContentLegal object.
 /// </summary>
 /// <param name="legalID">Initial value of the LegalID property.</param>
 public static ContentLegal CreateContentLegal(global::System.Int32 legalID)
 {
     ContentLegal contentLegal = new ContentLegal();
     contentLegal.LegalID = legalID;
     return contentLegal;
 }