public async Task HandleAsync(ICommandContext context, AcceptNewReplyCommand command) { var post = await context.GetAsync <Post>(command.AggregateRootId); var reply = await context.GetAsync <Reply>(command.ReplyId); post.AcceptNewReply(reply); }
public void Handle(ICommandContext context, AcceptNewReplyCommand command) { context.Get <Post>(command.AggregateRootId).AcceptNewReply(context.Get <Reply>(command.ReplyId)); }