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