Getting a reference to the AsCached property RRS feed

  • Question

  • I have my ObjectContext exposed as a public property and am able to access it via my DBContext.

    I want to enable caching for a drop down list. It requires the AsCached property. However, I can't get it to display in the intellisense. Do I need to include a specific namespace for it?

    Here is my existing LINQ statement that I want cached.

    IQueryable<Category> category = DbContext.Categories.Where(p => p.CategoryID > 0);

    I'm tying to do something like this. Note though, that there is no intellisense when placing the "." after Objectcontext.

    IQueryable<Category> category = DbContext.Objectcontext.Categories.AsCached.Where(p => p.CategoryID > 0);
    The ObjectContext pops up in the intellisense, but not the AsCached property.
    How can I get the AsCached property to appear?

    Bill Yeager
    • Edited by Bill_Yeager Tuesday, November 22, 2011 11:16 PM
    Tuesday, November 22, 2011 11:08 PM


All replies