/// <summary>
        /// Factory method. Loads a <see cref="FolderTypeNVL"/> object.
        /// </summary>
        /// <returns>A reference to the fetched <see cref="FolderTypeNVL"/> object.</returns>
        public static FolderTypeNVL GetFolderTypeNVL()
        {
            if (_list == null)
            {
                _list = DataPortal.Fetch <FolderTypeNVL>();
            }

            return(_list);
        }
 /// <summary>
 /// Factory method. Asynchronously loads a <see cref="FolderTypeNVL"/> object.
 /// </summary>
 /// <param name="callback">The completion callback method.</param>
 public static void GetFolderTypeNVL(EventHandler <DataPortalResult <FolderTypeNVL> > callback)
 {
     if (_list == null)
     {
         DataPortal.BeginFetch <FolderTypeNVL>((o, e) =>
         {
             _list = e.Object;
             callback(o, e);
         });
     }
     else
     {
         callback(null, new DataPortalResult <FolderTypeNVL>(_list, null, null));
     }
 }
        /// <summary>
        /// Loads a <see cref="FolderTypeNVL"/> collection from the database or from the cache.
        /// </summary>
        protected void DataPortal_Fetch()
        {
            if (IsCached)
            {
                LoadCachedList();
                return;
            }

            using (var cn = new SqlConnection(Database.DocStoreConnection))
            {
                using (var cmd = new SqlCommand("GetFolderTypeNVL", cn))
                {
                    cmd.CommandType = CommandType.StoredProcedure;
                    cn.Open();
                    var args = new DataPortalHookArgs(cmd);
                    OnFetchPre(args);
                    LoadCollection(cmd);
                    OnFetchPost(args);
                }
            }
            _list = this;
        }
 /// <summary>
 /// Used by async loaders to load the cache.
 /// </summary>
 /// <param name="list">The list to cache.</param>
 internal static void SetCache(FolderTypeNVL list)
 {
     _list = list;
 }
 /// <summary>
 /// Clears the in-memory FolderTypeNVL cache so it is reloaded on the next request.
 /// </summary>
 public static void InvalidateCache()
 {
     _list = null;
 }