예제 #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));
 }