public ActionResult Edit(ContentStrategy contentstrategy) { if (ModelState.IsValid) { db.ContentStrategies.Attach(contentstrategy); db.ObjectStateManager.ChangeObjectState(contentstrategy, EntityState.Modified); db.SaveChanges(); return RedirectToAction("Details"); } return View(contentstrategy); }
/// <summary> /// Deprecated Method for adding a new object to the ContentStrategies EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToContentStrategies(ContentStrategy contentStrategy) { base.AddObject("ContentStrategies", contentStrategy); }
/// <summary> /// Create a new ContentStrategy object. /// </summary> /// <param name="strategyID">Initial value of the StrategyID property.</param> public static ContentStrategy CreateContentStrategy(global::System.Int32 strategyID) { ContentStrategy contentStrategy = new ContentStrategy(); contentStrategy.StrategyID = strategyID; return contentStrategy; }