public static PlaceOrder ToPlaceOrderCommand(this OrderViewModel model, ConferenceAlias conferenceAlias, IConferenceQueryService conferenceQueryService) { var seatTypes = conferenceQueryService.GetPublishedSeatTypes(conferenceAlias.Id); var command = new PlaceOrder(); command.AggregateRootId = GuidUtil.NewSequentialId(); command.ConferenceId = conferenceAlias.Id; command.Seats = model.Seats.Where(x => x.Quantity > 0).Select(x => { var seat = seatTypes.Single(y => y.Id == x.SeatType); return new SeatInfo { SeatType = x.SeatType, Quantity = x.Quantity, SeatName = seat.Name, UnitPrice = seat.Price }; }).ToList(); return command; }
public OrderController(ICommandService commandService, IConferenceQueryService conferenceQueryService, IOrderQueryService orderQueryService) : base(conferenceQueryService, orderQueryService) { _commandService = commandService; }
public static PlaceOrder ToPlaceOrderCommand(this OrderViewModel model, ConferenceAlias conferenceAlias, IConferenceQueryService conferenceQueryService) { var seatTypes = conferenceQueryService.GetPublishedSeatTypes(conferenceAlias.Id); var command = new PlaceOrder(); command.AggregateRootId = GuidUtil.NewSequentialId(); command.ConferenceId = conferenceAlias.Id; command.Seats = model.Seats.Where(x => x.Quantity > 0).Select(x => { var seat = seatTypes.Single(y => y.Id == x.SeatType); return(new SeatInfo { SeatType = x.SeatType, Quantity = x.Quantity, SeatName = seat.Name, UnitPrice = seat.Price }); }).ToList(); return(command); }
public RegistrationController(ICommandService commandService, IConferenceQueryService conferenceQueryService, IOrderQueryService orderQueryService) : base(conferenceQueryService, orderQueryService) { _commandService = commandService; }
/// <summary> /// 构造函数 /// </summary> /// <param name="commandService"></param> /// <param name="conferenceQueryService"></param> public ConferenceController(ICommandService commandService, IConferenceQueryService conferenceQueryService) { _commandService = commandService; _conferenceQueryService = conferenceQueryService; }
public ConferenceTenantController(IConferenceQueryService conferenceQueryService, IOrderQueryService orderQueryService) { ConferenceQueryService = conferenceQueryService; OrderQueryService = orderQueryService; }
public DefaultController(IConferenceQueryService conferenceQueryService) { _conferenceQueryService = conferenceQueryService; }
public ConferenceController(IConferenceQueryService conferenceQueryService) { _conferenceQueryService = conferenceQueryService; }