public ActionResult Create(TheaterModels theatermodels) { if (ModelState.IsValid) { db.Theaters.Add(theatermodels); db.SaveChanges(); return RedirectToAction("Theaters"); } return View(theatermodels); }
public ActionResult Edit(TheaterModels theatermodels) { if (ModelState.IsValid) { db.Entry(theatermodels).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Theaters"); } return View(theatermodels); }