public void Handle(ICommandContext context, AddSeatType command)
 {
     context.Get <Conference>(command.AggregateRootId).AddSeat(new SeatTypeInfo(
                                                                   command.Name,
                                                                   command.Description,
                                                                   command.Price), command.Quantity);
 }
Esempio n. 2
0
        public async Task HandleAsync(ICommandContext context, AddSeatType command)
        {
            var conference = await context.GetAsync <Conference>(command.AggregateRootId);

            conference.AddSeat(new SeatTypeInfo(
                                   command.Name,
                                   command.Description,
                                   command.Price), command.Quantity);
        }
Esempio n. 3
0
 public static AddSeatType ToAddSeatTypeCommand(this SeatType model, ConferenceInfo conference)
 {
     var command = new AddSeatType(conference.Id);
     command.Name = model.Name;
     command.Description = model.Description;
     command.Price = model.Price;
     command.Quantity = model.Quantity;
     return command;
 }
Esempio n. 4
0
        public static AddSeatType ToAddSeatTypeCommand(this SeatType model, ConferenceInfo conference)
        {
            var command = new AddSeatType(conference.Id);

            command.Name        = model.Name;
            command.Description = model.Description;
            command.Price       = model.Price;
            command.Quantity    = model.Quantity;
            return(command);
        }