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

            Apply(@event);

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

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

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

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

            Apply(@event);

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

            comment.Approved = false;
        }