Ejemplo n.º 1
0
        public async Task <IActionResult> Buy([FromRoute] int id)
        {
            var ticket = await ticketsService.GetTicketById(id);

            await ordersService.AddTicketToOrder(User.Identity.Name, ticket);

            ticket.Status = TicketStatuses.waiting;

            await ticketsService.UpdTicketToDb(ticket);

            return(RedirectToAction("Index", "Orders", ticket));
        }