Example #1
0
        public void DisapproveComment(Guid commentId)
        {
            var @event = new CommentDisapproved(commentId);

            Apply(@event);

            AppendEvent(@event);
        }
Example #2
0
        public void Handle(CommentDisapproved @event)
        {
            var collection = CreateCollection();

            var find = Query.EQ("_id", @event.CommentId);

            collection.Remove(find, RemoveFlags.Single);
        }
Example #3
0
        public void Apply(CommentDisapproved @event)
        {
            var comment = _comments.First(x => x.Id == @event.CommentId);

            comment.Approved = false;
        }
Example #4
0
        public void DisapproveComment(Guid commentId)
        {
            var @event = new CommentDisapproved(commentId);

            Apply(@event);

            AppendEvent(@event);
        }
Example #5
0
        public void Apply(CommentDisapproved @event)
        {
            var comment = _comments.First(x => x.Id == @event.CommentId);

            comment.Approved = false;
        }