public ActionResult DeleteConfirmed(int id) { stat stat = db.stats.Find(id); db.stats.Remove(stat); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "pointsScored,gamesPlayed,Player_playerId,rushingTDs,rushingYDs,fumblesLost,receptions,receivingTDs,receivingYDs,passingYDs,passingINTs,passingTDs,Year,Week,statsID")] stat stat) { if (ModelState.IsValid) { db.Entry(stat).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Player_playerId = new SelectList(db.players, "playerId", "fName", stat.Player_playerId); return(View(stat)); }
// GET: stats/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } stat stat = db.stats.Find(id); if (stat == null) { return(HttpNotFound()); } return(View(stat)); }
// GET: stats/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } stat stat = db.stats.Find(id); if (stat == null) { return(HttpNotFound()); } ViewBag.Player_playerId = new SelectList(db.players, "playerId", "fName", stat.Player_playerId); return(View(stat)); }