Class Query<T>
Base class for typed query classes
Implements
Inherited Members
Namespace: EPiServer.Data.Dynamic.Linq
Assembly: EPiServer.Data.dll
Version: 7.19.2Syntax
public abstract class Query<T> : Query, IOrderedQueryable<T>, IQueryable<T>, IEnumerable<T>, IOrderedQueryable, IQueryable, IEnumerable, IQueryProvider
Type Parameters
| Name | Description |
|---|---|
| T |
Constructors
Query(DynamicDataStore)
Declaration
protected Query(DynamicDataStore store)
Parameters
| Type | Name | Description |
|---|---|---|
| DynamicDataStore | store |
Query(DynamicDataStore, LoadAsObjectType)
Declaration
protected Query(DynamicDataStore store, LoadAsObjectType loadObjectsAs)
Parameters
| Type | Name | Description |
|---|---|---|
| DynamicDataStore | store | |
| LoadAsObjectType | loadObjectsAs |
Properties
ElementType
Get the element type of the query
Declaration
public Type ElementType { get; }
Property Value
| Type | Description |
|---|---|
| System.Type |
Expression
Get an Expression for the query
Declaration
public Expression Expression { get; }
Property Value
| Type | Description |
|---|---|
| System.Linq.Expressions.Expression |
LoadObjectsAs
Declaration
protected LoadAsObjectType LoadObjectsAs { get; set; }
Property Value
| Type | Description |
|---|---|
| LoadAsObjectType |
Provider
Get a System.Linq.IQueryProvider for the query
Declaration
public IQueryProvider Provider { get; }
Property Value
| Type | Description |
|---|---|
| System.Linq.IQueryProvider |
Store
Declaration
protected DynamicDataStore Store { get; set; }
Property Value
| Type | Description |
|---|---|
| DynamicDataStore |
Methods
Clone()
Clone the current object
Declaration
protected override Query Clone()
Returns
| Type | Description |
|---|---|
| Query | A new Query with the same values as the current object |
Overrides
CreateQuery(Expression)
Create a new query object from the expression
Declaration
public IQueryable CreateQuery(Expression expression)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Linq.Expressions.Expression | expression | An Expression to use as the base for the query |
Returns
| Type | Description |
|---|---|
| System.Linq.IQueryable | An System.Linq.IQueryable |
CreateQuery<TElement>(Expression)
Create a new query object from the expression
Declaration
public IQueryable<TElement> CreateQuery<TElement>(Expression expression)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Linq.Expressions.Expression | expression | An Expression to use as the base for the query |
Returns
| Type | Description |
|---|---|
| System.Linq.IQueryable<TElement> | A System.Linq.IQueryable<> |
Type Parameters
| Name | Description |
|---|---|
| TElement | The System.Type the query will return |
Execute()
Declaration
protected override object Execute()
Returns
| Type | Description |
|---|---|
| System.Object |
Overrides
Execute(Expression)
Execute the expression
Declaration
public object Execute(Expression expression)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Linq.Expressions.Expression | expression | The Expression to execute |
Returns
| Type | Description |
|---|---|
| System.Object | A System.Object |
Execute<TResult>(Expression)
Execute the expression
Declaration
public TResult Execute<TResult>(Expression expression)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Linq.Expressions.Expression | expression | The Expression to execute |
Returns
| Type | Description |
|---|---|
| TResult | A TResult |
Type Parameters
| Name | Description |
|---|---|
| TResult | The System.Type the query will return |
ExecuteScalar<TResult>()
Declaration
protected TResult ExecuteScalar<TResult>()
Returns
| Type | Description |
|---|---|
| TResult |
Type Parameters
| Name | Description |
|---|---|
| TResult |
GetEnumerator()
Get an enumerator for the query
Declaration
public IEnumerator<T> GetEnumerator()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerator<T> | An System.Collections.Generic.IEnumerator<T> instance |
Transform<TTransform>(Expression)
Transform creates (and returns) a new instance of QueryT with the specified TRansform type. All local expressions are copied to the created instance expressions list. The given Expression, if its not null, is then also added to the new instance.
Declaration
protected override Query<TTransform> Transform<TTransform>(Expression expression)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Linq.Expressions.Expression | expression | Optional expression to add to the new instance. May be null |
Returns
| Type | Description |
|---|---|
| Query<TTransform> | A new QueryT instance |
Type Parameters
| Name | Description |
|---|---|
| TTransform | The type the new QueryT should infer |
Overrides
Explicit Interface Implementations
IEnumerable.GetEnumerator()
Get an enumerator for the query
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
| Type | Description |
|---|---|
| System.Collections.IEnumerator | An System.Collections.IEnumerator instance |