Click here to Skip to main content
15,893,663 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
I am getting an error:
The Type or namespace name 'ENTMenuItemBOList' could not be found.

I am just trying to do the example in the book.
Please Help.

File: Globals.cs

Code:
C#
using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Web.Caching;
using V2.PaidTimeOffBLL.Framework;



/// <summary>
/// Summary description for Globals
/// </summary>
public static class Globals
{
    #region Constants

    private const string CACHE_KEY_MENU_ITEMS = "MenuItems";
    private const string CACHE_KEY_USERS = "Users";

    #endregion Constants

    #region Methods

    public static ENTMenuItemBOList GetMenuItems(Cache cache)
    {
        //Check if the menus have been cached.
        if (cache[CACHE_KEY_MENU_ITEMS] == null)
        {
            LoadMenuItems(cache);
        }

        return (ENTMenuItemBOList)cache[CACHE_KEY_MENU_ITEMS];
    }

    public static void LoadMenuItems(Cache cache)
    {
        ENTMenuItemBOList menuItems = new ENTMenuItemBOList();
        menuItems.Load();

        cache.Remove(CACHE_KEY_MENU_ITEMS);
        cache[CACHE_KEY_MENU_ITEMS] = menuItems;
    }

    #endregion Methods

}
Posted
Updated 9-Feb-14 6:25am
v2
Comments
Sampath Lokuge 9-Feb-14 12:11pm    
Is this compile time error or what ?
Richard MacCutchan 9-Feb-14 12:26pm    
Where is the class ENTMenuItemBOList defined?
Sergey Alexandrovich Kryukov 10-Feb-14 0:10am    
If a code sample from the book does not compile, ask the author of this book. Why would you ask us?
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900