public ActionResult Create([Bind(Include = "MId,Mname,Price")] Movie movie) { if (ModelState.IsValid) { db.Movies.Add(movie); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(movie)); }
public ActionResult Create([Bind(Include = "TId,Tname,Tlocation,MovieMId")] Theatre theatre) { if (ModelState.IsValid) { db.Theatres.Add(theatre); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.MovieMId = new SelectList(db.Movies, "MId", "Mname", theatre.MovieMId); return(View(theatre)); }