Exemple #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            BookClubMember bookClubMember = db.BookClubMembers.Find(id);

            db.BookClubMembers.Remove(bookClubMember);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemple #2
0
 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));
 }
Exemple #3
0
        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));
        }
Exemple #4
0
        // 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));
        }