Method FromCacheOnly
FromCacheOnly<T>(IQueryable<T>)
Executes the query on the cache and returns the result as generic IEnumerable.
Declaration
public static IEnumerable<T> FromCacheOnly<T>(this IQueryable<T> query)
where T : class
Parameters
Type | Name | Description |
---|---|---|
IQueryable<T> | query | The query to be executed. |
Returns
Type | Description |
---|---|
IEnumerable<T> | Returns the result set of the query after executing it in the cache. In case of no result return the default values. |
Type Parameters
Name | Description |
---|---|
T | The generic type of the collection |
FromCacheOnly<T>(QueryDeferred<T>)
Executes the query on the cache and returns the result as generic type.
Declaration
public static T FromCacheOnly<T>(this QueryDeferred<T> query)
Parameters
Type | Name | Description |
---|---|---|
Alachisoft.NCache.EntityFrameworkCore.QueryDeferred<T> | query | The query to be executed. |
Returns
Type | Description |
---|---|
T | Returns the result of the query after executing it in the cache. In case of no result return the default value. |
Type Parameters
Name | Description |
---|---|
T | The generic type of the result. |