Ejemplo n.º 1
0
        public async Task<ActionResult> AddTicket(Order order, Place place)
        {
            Seat seat = await db.Seats.GetByIdAsync(place.Seat);
            Seance seance = await db.Seances.GetByIdAsync(seat.SeanceId);
            Ticket ticket = new Ticket();
            ticket.Seance = seance;
            ticket.Seance.Movie = await db.Movies.GetByIdAsync(seance.MovieId);
            ticket.Row = place.Row;
            ticket.Seat = place.Seat;
            order.AddTicket(ticket);

            return RedirectToAction("Checkout"); ;
        }
Ejemplo n.º 2
0
 public void AddTicket(Ticket ticket)
 {
     Tickets.Add(ticket);
 }