コード例 #1
0
        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);
        }
コード例 #2
0
 public void Handle(ICommandContext context, AcceptNewReplyCommand command)
 {
     context.Get <Post>(command.AggregateRootId).AcceptNewReply(context.Get <Reply>(command.ReplyId));
 }