Exemple #1
0
 public static Task ExecuteAsync(ApplicationServiceContext context, CheckoutCommand command)
 => context.ExecuteAsync <CartState>(command, state => new[] { new CartCheckedoutEvent(Guid.Parse(command.AggregateId.Id)) });
Exemple #2
0
 public static Task ExecuteAsync(ApplicationServiceContext context, CreateOrderCommand command)
 => context.ExecuteAsync <OrderState>(command, state => new[] { new OrderCreatedEvent(Guid.Parse(command.AggregateId.ToString())) });
Exemple #3
0
 public static Task ExecuteAsync(ApplicationServiceContext context, AddItemCommand command)
 => context.ExecuteAsync <CartState>(command, state => new[] { new ItemAddedEvent(command.AggregateId) });