Example #1
0
        public void ExecuteAction()
        {
            var id = Ask.CommentId();

            _commentCommandHandler.Handle(new DeleteComment {
                Id = id
            });

            var comments = _commentQueryRepository.GetAll(id);

            Write.Comments(comments);
        }
Example #2
0
        public void ExecuteAction()
        {
            var id   = Ask.PostId();
            var text = Ask.CommentText();

            _commentCommandHandler.Handle(new AddComment {
                PostId = id, Text = text
            });

            var comments = _commentQueryRepository.GetAll(id);

            Write.Comments(comments);
        }