public ActionResult Create(Show show) { if (ModelState.IsValid) { db.Shows.Add(show); db.SaveChanges(); return RedirectToAction("Index"); } return View(show); }
public ActionResult Edit(Show show) { if (ModelState.IsValid) { db.Entry(show).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(show); }