public ActionResult Create([Bind(Include = "Id,Name,Email,Address,Details,Mobile,Seats,Status,Price")] Hall hall) { if (ModelState.IsValid) { db.Halls.Add(hall); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(hall)); }
public ActionResult Create([Bind(Include = "Id,Name,Email,Address,Mobile,DateTime,HallId")] Book book) { if (ModelState.IsValid) { db.Books.Add(book); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.HallId = new SelectList(db.Halls, "Id", "Name", book.HallId); return(View(book)); }