Esempio n. 1
0
 public ActionResult DeleteConfirmed(int id)
 {
     RunningModel.runner runner = db.runners.Find(id);
     db.runners.Remove(runner);
     db.SaveChanges();
     return(RedirectToAction("Index"));
 }
Esempio n. 2
0
 // 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));
 }