public void UpdateCinemaShow(CinemaShowDTO cinemaShow) { if (cinemaShow == null) { throw new ArgumentNullException(nameof(cinemaShow)); } _context.SaveChanges(); }
public void BookShow(CinemaShowDTO cinemaShow, SeatDTO seat) { if (cinemaShow == null) { throw new ArgumentNullException(nameof(cinemaShow)); } if (seat == null) { throw new ArgumentNullException(nameof(seat)); } var booking = new BookingDTO { CinemaShow = cinemaShow, Seat = seat, IsBooked = true }; _context.Bookings.Add(booking); _context.SaveChanges(); }