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