public Task HandleAsync(ICommandContext context, PlaceOrder command) { return(context.AddAsync(new Order( command.AggregateRootId, command.ConferenceId, command.Seats.Select(x => new SeatQuantity(new SeatType(x.SeatType, x.SeatName, x.UnitPrice), x.Quantity)), _pricingService))); }
public Task HandleAsync(ICommandContext context, CreatePayment command) { return(context.AddAsync(new Payment( command.AggregateRootId, command.OrderId, command.ConferenceId, command.Description, command.TotalAmount, command.Lines.Select(x => new PaymentItem(x.Description, x.Amount)).ToList()))); }
public Task HandleAsync(ICommandContext context, StartTransferTransactionCommand command) { return(context.AddAsync(new TransferTransaction(command.AggregateRootId, command.TransactionInfo))); }
public Task HandleAsync(ICommandContext context, StartDepositTransactionCommand command) { return(context.AddAsync(new DepositTransaction(command.AggregateRootId, command.AccountId, command.Amount))); }
public Task HandleAsync(ICommandContext context, CreateAccountCommand command) { return(context.AddAsync(new BankAccount(command.AggregateRootId, command.Owner))); }
public Task HandleAsync(ICommandContext context, CreateNoteCommand command) { return(context.AddAsync(new Note(command.AggregateRootId, command.Title))); }
public Task HandleAsync(ICommandContext context, CreateSectionCommand command) { return(context.AddAsync(new Section(command.AggregateRootId, command.Name, command.Description))); }
public Task HandleAsync(ICommandContext context, CreatePostCommand command) { return(context.AddAsync(new Post(command.AggregateRootId, command.Subject, command.Body, command.SectionId, command.AuthorId))); }