public ActionResult DeleteConfirmed(int id) { BookClubMember bookClubMember = db.BookClubMembers.Find(id); db.BookClubMembers.Remove(bookClubMember); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "MemberID,MemberFirstName,MemberLastName,MemberEmail")] BookClubMember bookClubMember) { if (ModelState.IsValid) { db.Entry(bookClubMember).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(bookClubMember)); }
public ActionResult Create([Bind(Include = "MemberID,MemberFirstName,MemberLastName,MemberEmail")] BookClubMember bookClubMember) { if (ModelState.IsValid) { db.BookClubMembers.Add(bookClubMember); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(bookClubMember)); }
// GET: BookClubMember/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } BookClubMember bookClubMember = db.BookClubMembers.Find(id); if (bookClubMember == null) { return(HttpNotFound()); } return(View(bookClubMember)); }