예제 #1
0
 public ActionResult Edit(ContentAboutU contentaboutu)
 {
     if (ModelState.IsValid)
     {
         db.ContentAboutUs.Attach(contentaboutu);
         db.ObjectStateManager.ChangeObjectState(contentaboutu, EntityState.Modified);
         db.SaveChanges();
         return RedirectToAction("Details", new { id = 1 });
     }
     return View(contentaboutu);
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the ContentAboutUs EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToContentAboutUs(ContentAboutU contentAboutU)
 {
     base.AddObject("ContentAboutUs", contentAboutU);
 }
 /// <summary>
 /// Create a new ContentAboutU object.
 /// </summary>
 /// <param name="aboutUsID">Initial value of the AboutUsID property.</param>
 public static ContentAboutU CreateContentAboutU(global::System.Int32 aboutUsID)
 {
     ContentAboutU contentAboutU = new ContentAboutU();
     contentAboutU.AboutUsID = aboutUsID;
     return contentAboutU;
 }