public async Task <IActionResult> Create([Bind("ID,ID_CinemaHall,ID_Movie,Date,StartingTime,ID_Cinema")] Seance seance) { if (ModelState.IsValid) { _context.Add(seance); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(seance)); }
public async Task <IActionResult> Create([Bind("ID,Title,Genre,Type,Rating,ImgPath,ID_Cinema")] Movie movie) { if (ModelState.IsValid) { _context.Add(movie); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(movie)); }
public async Task <IActionResult> Create([Bind("ID,Name,NumberOfSeats,ID_Cinema")] CinemaHall cinemaHall) { if (ModelState.IsValid) { _context.Add(cinemaHall); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(cinemaHall)); }
public async Task <IActionResult> Create([Bind("ID,ID_Seance,ID_Klient,SeatNumber,ID_Cinema")] Reservation reservation) { if (ModelState.IsValid) { _context.Add(reservation); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(reservation)); }