Class ODataQueryProvider
Provides the LINQ provider responsible for compiling OData queries.
public sealed class ODataQueryProvider : IQueryProvider
- Inheritance
-
ODataQueryProvider
- Implements
- Inherited Members
- Extension Methods
Constructors
ODataQueryProvider(string)
Initializes a new instance of the ODataQueryProvider class.
public ODataQueryProvider(string entitySetName)
Parameters
entitySetNamestringThe entity set associated with the provider.
Exceptions
- ArgumentException
Thrown when
entitySetNameis null or whitespace.
Methods
Compile(Expression)
Compiles the provided expression tree into an ODataQueryCompilation instance.
public ODataQueryCompilation Compile(Expression expression)
Parameters
expressionExpressionExpression tree describing the query.
Returns
- ODataQueryCompilation
The compiled query.
Exceptions
- ArgumentNullException
Thrown when
expressionis null.
CreateQuery(Expression)
Creates a query from an expression tree without a compile-time generic argument.
public IQueryable CreateQuery(Expression expression)
Parameters
expressionExpressionThe expression tree representing the query.
Returns
- IQueryable
An IQueryable instance.
CreateQuery<TElement>(Expression)
Creates a strongly typed query from an expression tree.
public IQueryable<TElement> CreateQuery<TElement>(Expression expression)
Parameters
expressionExpressionThe expression tree representing the query.
Returns
- IQueryable<TElement>
A new ODataQueryable<TEntity> instance.
Type Parameters
TElementType of the entity represented by the query.
Execute(Expression)
Executes the query represented by an expression tree and converts it into an ODataQueryCompilation.
public object Execute(Expression expression)
Parameters
expressionExpressionThe expression tree to compile.
Returns
- object
The compiled query representation.
Execute<TResult>(Expression)
Executes the query represented by an expression tree and converts it into an ODataQueryCompilation.
public TResult Execute<TResult>(Expression expression)
Parameters
expressionExpressionThe expression tree to compile.
Returns
- TResult
The compiled query representation.
Type Parameters
TResultType expected by the caller.