Constructor NCacheQuery
NCacheQuery(ICache)
The constructor used to create a custom class LINQ object.
Declaration
public NCacheQuery(ICache cache)
Parameters
Type | Name | Description |
---|---|---|
ICache | cache | This is an instance of cache interface that contains services and methods used to perform operations on the cache. |
Examples
The following example creates a custom class LINQ object and performs a LINQ query to search the cache.
IQueryable <Product>= new NCacheQuery <Product> (cache);
var result = from prod in products
where prod.ProductID > 1001
select prod;
if (result != null)
{
foreach (Product product in result)
{
// Perform operations
}
}