Method Cache
Cache<T>(IQueryable<T>)
This method executes the query on cache first. If cache contains the result of the query, it returns the result from the cache otherwise it executes the query on configured datasource and load the data into the cache and then return the result to the user.
Declaration
public static IQueryable<T> Cache<T>(this IQueryable<T> source)
where T : class
Parameters
| Type | Name | Description |
|---|---|---|
| System.Linq.IQueryable<T> | source | The Specified DataSource. |
Returns
| Type | Description |
|---|---|
| System.Linq.IQueryable<T> | The result set of the query. |
Type Parameters
| Name | Description |
|---|---|
| T | The generic type of the collection. |