public IActionResult BookSeat(MovieTicket NewBook)//booking the number of seats { int logged = Convert.ToInt32(HttpContext.Session.GetInt32("Logged")); if (logged == 1) { var id = Convert.ToInt32(HttpContext.Session.GetInt32("TimeID")); var Name = HttpContext.Session.GetString("UserName"); var UserID = HttpContext.Session.GetInt32("UserID"); NewBook.UserID = Convert.ToInt32(UserID); NewBook.TimeID = id; NewBook.Name = Convert.ToString(Name); MovieDBObj.Booking(id, NewBook); MovieDBObj.UpdateSeat(id, NewBook.NumberSeats); return(RedirectToAction("../Movie/Home")); } else { return(RedirectToAction("../Movie/Home")); } }