public void DisapproveComment(Guid commentId) { var @event = new CommentDisapproved(commentId); Apply(@event); AppendEvent(@event); }
public void Handle(CommentDisapproved @event) { var collection = CreateCollection(); var find = Query.EQ("_id", @event.CommentId); collection.Remove(find, RemoveFlags.Single); }
public void Apply(CommentDisapproved @event) { var comment = _comments.First(x => x.Id == @event.CommentId); comment.Approved = false; }