System.Linq.IQueryProvider.CreateQuery Method

Constructs an System.Linq.IQueryable object that can evaluate the query represented by a specified expression tree.

Syntax

public IQueryable CreateQuery (System.Linq.Expressions.Expression expression)

Parameters

expression
An expression tree that represents a vbteclinq query.

Returns

An System.Linq.IQueryable that can evaluate the query represented by the specified expression tree.

Remarks

Note:

The IQueryable.Expression property of the returned System.Linq.IQueryable object is equal to expression.

The IQueryProvider.CreateQuery(System.Linq.Expressions.Expression) method is used to create new System.Linq.IQueryable objects, given an expression tree. The query that is represented by the returned object is associated with a specific LINQ provider.

Several of the standard query operator methods defined in System.Linq.Queryable, such as Queryable.OfType``1(IQueryable) and Queryable.Cast``1(IQueryable), call this method. They pass it a System.Linq.Expressions.MethodCallExpression that represents a vbteclinq query.

Requirements

Namespace: System.Linq
Assembly: System.Core (in System.Core.dll)
Assembly Versions: 3.5.0.0, 4.0.0.0