public ActionResult Edit(MasterList masterlist) { if (ModelState.IsValid) { db.MasterList.Attach(masterlist); db.ObjectStateManager.ChangeObjectState(masterlist, EntityState.Modified); db.SaveChanges(); return RedirectToAction("Index"); } return View(masterlist); }
public ActionResult Create(MasterList masterlist) { if (ModelState.IsValid) { db.MasterList.AddObject(masterlist); db.SaveChanges(); return RedirectToAction("Index"); } return View(masterlist); }
/// <summary> /// Deprecated Method for adding a new object to the MasterList EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToMasterList(MasterList masterList) { base.AddObject("MasterList", masterList); }
/// <summary> /// Create a new MasterList object. /// </summary> /// <param name="id">Initial value of the ID property.</param> /// <param name="sSMA_TimeStamp">Initial value of the SSMA_TimeStamp property.</param> public static MasterList CreateMasterList(global::System.Int32 id, global::System.Byte[] sSMA_TimeStamp) { MasterList masterList = new MasterList(); masterList.ID = id; masterList.SSMA_TimeStamp = sSMA_TimeStamp; return masterList; }