public ActionResult Create(Season season) { if (ModelState.IsValid) { db.Seasons.Add(season); db.SaveChanges(); return RedirectToAction("Index"); } ViewBag.ShowID = new SelectList(db.Shows, "ShowID", "Name", season.ShowID); return View(season); }
public ActionResult Edit(Season season) { if (ModelState.IsValid) { db.Entry(season).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } ViewBag.ShowID = new SelectList(db.Shows, "ShowID", "Name", season.ShowID); return View(season); }