public ActionResult DeleteConfirmed(int id)
        {
            RPGBookDB rPGBookDB = db.RPGBooks.Find(id);

            db.RPGBooks.Remove(rPGBookDB);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "ID,Name,Game,BookType,System,ISBN,Genre,HasPlayed,Rating")] RPGBookDB rPGBookDB)
 {
     if (ModelState.IsValid)
     {
         db.Entry(rPGBookDB).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(rPGBookDB));
 }
        public ActionResult Create([Bind(Include = "ID,Name,Game,BookType,System,ISBN,Genre,HasPlayed,Rating")] RPGBookDB rPGBookDB)
        {
            if (ModelState.IsValid)
            {
                db.RPGBooks.Add(rPGBookDB);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(rPGBookDB));
        }
        // GET: RPGBookDBs/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            RPGBookDB rPGBookDB = db.RPGBooks.Find(id);

            if (rPGBookDB == null)
            {
                return(HttpNotFound());
            }
            return(View(rPGBookDB));
        }