public void Apply(BlogClosedEvent evnt) { _links.Clear(); _tags.Clear(); _categories.Clear(); _isClosed = true; }
public void Handle(BlogClosedEvent evnt) { var key = KeyUtils.GetBlogListKey(); var state = _db.GetObject <BlogListState>(key); if (state != null) { throw new Exception("There is a blog with the same host name in the store."); } state.Blogs.Remove(evnt.AggregateId); _db.SetObject(key, state); }
public void Handle(BlogClosedEvent evnt) { var key = KeyUtils.GetStateKey(evnt.AggregateId); _db.KeyDelete(key); }