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