public ActionResult DeleteConfirmed(int id) { Season1 season1 = db.Seasons1.Find(id); db.Seasons1.Remove(season1); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "SeasonID,Season")] Season1 season1) { if (ModelState.IsValid) { db.Entry(season1).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(season1)); }
public ActionResult Create([Bind(Include = "SeasonID,Season")] Season1 season1) { if (ModelState.IsValid) { db.Seasons1.Add(season1); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(season1)); }
// GET: Season1/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Season1 season1 = db.Seasons1.Find(id); if (season1 == null) { return(HttpNotFound()); } return(View(season1)); }