示例#1
0
 /// <summary>
 /// Deprecated Method for adding a new object to the CauseGroups EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToCauseGroups(CauseGroup causeGroup)
 {
     base.AddObject("CauseGroups", causeGroup);
 }
示例#2
0
 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);
 }
示例#3
0
 /// <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;
 }
示例#4
0
 public ActionResult CauseGroupNew(CauseGroup group)
 {
     if (ModelState.IsValid)
     {
         db.CauseGroups.AddObject(group);
         db.SaveChanges();
         return RedirectToAction("CauseGroupList");
     }
     return View(group);
 }