public void Handle(ICommandContext context, AddSeatType command) { context.Get <Conference>(command.AggregateRootId).AddSeat(new SeatTypeInfo( command.Name, command.Description, command.Price), command.Quantity); }
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); }
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; }
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); }