/// <summary>
        /// Gets the content level nodes.
        /// </summary>
        /// <returns></returns>
        public Dictionary <int, ICMSContentLevelNode> GetContentLevelNodes()
        {
            Dictionary <int, ICMSContentLevelNode> records = new Dictionary <int, ICMSContentLevelNode>();

            try
            {
                using (IDataStoreContext dataStoreContext = this._DataStore.CreateContext())
                {
                    foreach (ICMSContentLevelNode record in dataStoreContext.cms_ContentLevelNodes_Get())
                    {
                        records[record.ContentLevelNodeId] = record;
                    }
                }
            }
            catch (Exception ex)
            {
                _Log.Error("Error at cms_ContentLevelNodes_Get", ex);
                throw new DataStoreException(ex, true);
            }

            foreach (ICMSContentLevelNode record in records.Values)
            {
                if (record.ParentContentLevelNodeId.HasValue)
                {
                    record.Parent = records[record.ParentContentLevelNodeId.Value];
                    records[record.ParentContentLevelNodeId.Value].Children.Add(record);
                }
            }

            return(records);
        }
 /// <summary>
 /// Gets the content level nodes.
 /// </summary>
 /// <param name="level">The level.</param>
 /// <param name="parentContentLevelNodeId">The parent content level node id.</param>
 /// <returns></returns>
 public List <ICMSContentLevelNode> GetContentLevelNodes(int level, int?parentContentLevelNodeId, int?threadId, int?sectionId)
 {
     try
     {
         using (IDataStoreContext dataStoreContext = this._DataStore.CreateContext())
         {
             return(dataStoreContext.cms_ContentLevelNodes_Get(level, parentContentLevelNodeId, threadId, sectionId).ToList());
         }
     }
     catch (Exception ex)
     {
         _Log.Error("Error at cms_ContentLevelNodes_Get", ex);
         throw new DataStoreException(ex, true);
     }
 }