public ActionResult DeleteConfirmed(int id) { MembershipOption2 membershipOption2 = db.MembershipOptions.Find(id); db.MembershipOptions.Remove(membershipOption2); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,ClubId,Option,OtherName,Expiration,Price,Description,IsActive")] MembershipOption2 membershipOption2) { if (ModelState.IsValid) { db.Entry(membershipOption2).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(membershipOption2)); }
public ActionResult Create([Bind(Include = "Id,ClubId,Option,OtherName,Expiration,Price,Description,IsActive")] MembershipOption2 membershipOption2) { if (ModelState.IsValid) { db.MembershipOptions.Add(membershipOption2); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(membershipOption2)); }
// GET: MembershipOption2/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } MembershipOption2 membershipOption2 = db.MembershipOptions.Find(id); if (membershipOption2 == null) { return(HttpNotFound()); } return(View(membershipOption2)); }