public ActionResult DeleteConfirmed(int id)
        {
            PCtoSpellBinding pCtoSpellBinding = db.PCSpells.Find(id);

            db.PCSpells.Remove(pCtoSpellBinding);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "PCtoSPBindID,PCID,SpellID")] PCtoSpellBinding pCtoSpellBinding)
 {
     if (ModelState.IsValid)
     {
         db.Entry(pCtoSpellBinding).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.PCID    = new SelectList(db.PlayerCharacters, "PCID", "Name", pCtoSpellBinding.PCID);
     ViewBag.SpellID = new SelectList(db.Spells, "SpellID", "Name", pCtoSpellBinding.SpellID);
     return(View(pCtoSpellBinding));
 }
        // GET: BindSpells/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            PCtoSpellBinding pCtoSpellBinding = db.PCSpells.Find(id);

            if (pCtoSpellBinding == null)
            {
                return(HttpNotFound());
            }
            return(View(pCtoSpellBinding));
        }
        // GET: BindSpells/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            PCtoSpellBinding pCtoSpellBinding = db.PCSpells.Find(id);

            if (pCtoSpellBinding == null)
            {
                return(HttpNotFound());
            }
            ViewBag.PCID    = new SelectList(db.PlayerCharacters, "PCID", "Name", pCtoSpellBinding.PCID);
            ViewBag.SpellID = new SelectList(db.Spells, "SpellID", "Name", pCtoSpellBinding.SpellID);
            return(View(pCtoSpellBinding));
        }