public ActionResult DeleteConfirmed(int id) { RunningModel.runner runner = db.runners.Find(id); db.runners.Remove(runner); db.SaveChanges(); return(RedirectToAction("Index")); }
// GET: RaceRunners/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } RunningModel.runner runner = db.runners.Find(id); if (runner == null) { return(HttpNotFound()); } return(View(runner)); }