public ActionResult DeleteConfirmed(int id) { PCtoFeatureBinding pCtoFeatureBinding = db.PCFeatures.Find(id); db.PCFeatures.Remove(pCtoFeatureBinding); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "PCtoFEBindID,PCID,FeatureID")] PCtoFeatureBinding pCtoFeatureBinding) { if (ModelState.IsValid) { db.Entry(pCtoFeatureBinding).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.FeatureID = new SelectList(db.Features, "FeatureID", "Name", pCtoFeatureBinding.FeatureID); ViewBag.PCID = new SelectList(db.PlayerCharacters, "PCID", "Name", pCtoFeatureBinding.PCID); return(View(pCtoFeatureBinding)); }
// GET: BindFeatures/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } PCtoFeatureBinding pCtoFeatureBinding = db.PCFeatures.Find(id); if (pCtoFeatureBinding == null) { return(HttpNotFound()); } return(View(pCtoFeatureBinding)); }
// GET: BindFeatures/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } PCtoFeatureBinding pCtoFeatureBinding = db.PCFeatures.Find(id); if (pCtoFeatureBinding == null) { return(HttpNotFound()); } ViewBag.FeatureID = new SelectList(db.Features, "FeatureID", "Name", pCtoFeatureBinding.FeatureID); ViewBag.PCID = new SelectList(db.PlayerCharacters, "PCID", "Name", pCtoFeatureBinding.PCID); return(View(pCtoFeatureBinding)); }