public CheckInInput(PartInstance partInstance, PriceOption priceOption, DateTime timeStamp, int partId, bool isExisiting, int?quantity = null, Price price = null) { this.PartInstance = partInstance; this.TimeStamp = timeStamp; this.PricingOption = priceOption; this.Price = price; this.PartId = partId; this.Quantity = quantity; this.IsExisiting = isExisiting; }
public async Task HandleAsync(ReserveTicketCommand command) { var order = await _orderRepository.Get(Id.From(command.OrderId)); var ticketId = Id.From(command.TicketId); var eventId = Id.From(command.EventId); var seatId = Id.From(command.SceneSeatId); var prciceOptionId = Id.From(command.PriceOptionId); var seat = new Seat(seatId); var priceOption = new PriceOption(prciceOptionId, command.PriceOptionName, command.PriceZoneName, command.GrossAmount); var ticket = new Ticket(ticketId, eventId, seat, priceOption); order.AddTicket(ticket); await _orderRepository.Save(order); await EventBus.Current.PublishAsync(new TicketAddedEvent(order.Id, ticket.Id)); }