private IBoardPostEntity LoadPostLight(IEsentSession session, PostsTable table, bool getPostCount, PostStoreEntityType?entityType)
        {
            BasicEntityInfo         bi = default(BasicEntityInfo);
            PostModelStorePostLight r  = IsOriginalPageSequence(entityType) ? new PostModelStorePostLightWithSequence() : new PostModelStorePostLight();

            SetPostLightData(session, table, getPostCount, r, ref bi);
            return(r);
        }
        private void SetPostLightData(IEsentSession session, PostsTable.ViewValues.PostLightLoadView v, bool getPostCount, PostModelStorePostLight data, ref BasicEntityInfo bi)
        {
            SetBareEntityData(v, data, ref bi);
            data.BoardSpecificDate = v.BoardSpecificDate;
            data.Counter           = getPostCount && bi.parentEntityId != null?GetPostCounterNumber(session, bi.parentEntityId.Value, bi.sequenceId) ?? 0 : 0;

            data.Date    = FromUtcToOffset(v.Date) ?? DateTimeOffset.MinValue;
            data.Flags   = v.Flags.Where(g => g?.Value != null).Select(g => g.Value.Value).Distinct().ToList();
            data.TagsSet = v.ThreadTags
                           .Where(t => !string.IsNullOrEmpty(t?.Value))
                           .Select(t => t.Value)
                           .Distinct()
                           .OrderBy(t => t, StringComparer.CurrentCulture)
                           .ToArray();
            data.LLikes    = v.Likes;
            data.LDislikes = v.Dislikes;
        }
 private void SetPostLightData(IEsentSession session, PostsTable table, bool getPostCount, PostModelStorePostLight data, ref BasicEntityInfo bi)
 {
     SetPostLightData(session, table.Views.PostLightLoadView.Fetch(), getPostCount, data, ref bi);
 }