public ActionResult Edit(ContentArchitecture contentarchitecture) { if (ModelState.IsValid) { db.ContentArchitectures.Attach(contentarchitecture); db.ObjectStateManager.ChangeObjectState(contentarchitecture, EntityState.Modified); db.SaveChanges(); return RedirectToAction("Index"); } return View(contentarchitecture); }
public ActionResult Create(ContentArchitecture contentarchitecture) { if (ModelState.IsValid) { db.ContentArchitectures.AddObject(contentarchitecture); db.SaveChanges(); return RedirectToAction("Index"); } return View(contentarchitecture); }
/// <summary> /// Deprecated Method for adding a new object to the ContentArchitectures EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToContentArchitectures(ContentArchitecture contentArchitecture) { base.AddObject("ContentArchitectures", contentArchitecture); }
/// <summary> /// Create a new ContentArchitecture object. /// </summary> /// <param name="architectureID">Initial value of the ArchitectureID property.</param> public static ContentArchitecture CreateContentArchitecture(global::System.Int32 architectureID) { ContentArchitecture contentArchitecture = new ContentArchitecture(); contentArchitecture.ArchitectureID = architectureID; return contentArchitecture; }