/// <summary> /// Deprecated Method for adding a new object to the CauseGroups EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToCauseGroups(CauseGroup causeGroup) { base.AddObject("CauseGroups", causeGroup); }
public ActionResult CauseGroupEdit(CauseGroup group) { if (ModelState.IsValid) { db.CauseGroups.Attach(group); db.ObjectStateManager.ChangeObjectState(group, EntityState.Modified); db.SaveChanges(); return RedirectToAction("CauseGroupList"); } return View(group); }
/// <summary> /// Create a new CauseGroup object. /// </summary> /// <param name="causeGroupId">Initial value of the CauseGroupId property.</param> /// <param name="causeGroupName">Initial value of the CauseGroupName property.</param> public static CauseGroup CreateCauseGroup(global::System.Int32 causeGroupId, global::System.String causeGroupName) { CauseGroup causeGroup = new CauseGroup(); causeGroup.CauseGroupId = causeGroupId; causeGroup.CauseGroupName = causeGroupName; return causeGroup; }
public ActionResult CauseGroupNew(CauseGroup group) { if (ModelState.IsValid) { db.CauseGroups.AddObject(group); db.SaveChanges(); return RedirectToAction("CauseGroupList"); } return View(group); }