protected virtual void Handle(ForumStateChanged evnt)
 {
     var forum = _entityManager.GetById<ForumEntity>(evnt.Id);
     forum.TotalThread = evnt.State.TotalThread;
     forum.TotalPost = evnt.State.TotalPost;
     forum.LatestThreadId = evnt.State.LatestThreadId;
     forum.LatestPostAuthorId = evnt.State.LatestPostAuthorId;
     _entityManager.Update(forum);
 }
 private void Handle(ForumStateChanged evnt)
 {
     using (var conn = _connectionFactory.OpenConnection())
     {
         conn.Update(new
         {
             TotalThread = evnt.State.TotalThread,
             TotalPost = evnt.State.TotalPost,
             LatestThreadId = evnt.State.LatestThreadId,
             LatestPostAuthorId = evnt.State.LatestPostAuthorId
         },
         new { Id = evnt.Id },
         "EventSourcing_Sample_Forum");
     }
 }