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