Example #1
0
        public void Unpublish()
        {
            var @event = new PostUnpublished();

            Apply(@event);

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

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

            collection.Remove(find, RemoveFlags.Single);
        }
Example #3
0
        public void Handle(PostUnpublished @event)
        {
            var collection = CreateCollection();

            var find   = Query.EQ("_id", @event.AggregateRootId);
            var update = Update.Set("PublishedOn", DateTime.MinValue)
                         .Set("IsPublished", false);

            collection.Update(find, update);
        }
Example #4
0
 public void Apply(PostUnpublished @event)
 {
     IsPublished = false;
     PublishedOn = default(DateTime);
 }
Example #5
0
        public void Unpublish()
        {
            var @event = new PostUnpublished();

            Apply(@event);

            AppendEvent(@event);
        }
Example #6
0
 public void Apply(PostUnpublished @event)
 {
     IsPublished = false;
     PublishedOn = default(DateTime);
 }