IQueryProvider.CreateQuery IQueryProvider.CreateQuery IQueryProvider.CreateQuery Method

定義

多載

CreateQuery(Expression) CreateQuery(Expression) CreateQuery(Expression)

建構 IQueryable 物件,這個物件可評估由指定的運算式樹狀架構所表示的查詢。Constructs an IQueryable object that can evaluate the query represented by a specified expression tree.

CreateQuery<TElement>(Expression) CreateQuery<TElement>(Expression) CreateQuery<TElement>(Expression)

建構 IQueryable<T> 物件,這個物件可評估由指定的運算式樹狀架構所表示的查詢。Constructs an IQueryable<T> object that can evaluate the query represented by a specified expression tree.

CreateQuery(Expression) CreateQuery(Expression) CreateQuery(Expression)

建構 IQueryable 物件,這個物件可評估由指定的運算式樹狀架構所表示的查詢。Constructs an IQueryable object that can evaluate the query represented by a specified expression tree.

public:
 System::Linq::IQueryable ^ CreateQuery(System::Linq::Expressions::Expression ^ expression);
public System.Linq.IQueryable CreateQuery (System.Linq.Expressions.Expression expression);
abstract member CreateQuery : System.Linq.Expressions.Expression -> System.Linq.IQueryable

參數

expression
Expression Expression Expression

代表 LINQLINQ 查詢的運算式樹狀架構。An expression tree that represents a LINQLINQ query.

傳回

IQueryable,可評估由指定的運算式樹狀架構所表示的查詢。An IQueryable that can evaluate the query represented by the specified expression tree.

備註

注意

Expression屬性傳回之IQueryable物件是否等於expressionThe Expression property of the returned IQueryable object is equal to expression.

CreateQuery方法用來建立新IQueryable物件,指定運算式樹狀架構。The CreateQuery method is used to create new IQueryable objects, given an expression tree. 查詢所傳回的物件表示為特定的 LINQ 提供者相關聯。The query that is represented by the returned object is associated with a specific LINQ provider.

中所定義的標準查詢運算子方法的數個Queryable,這類OfTypeCast,呼叫這個方法。Several of the standard query operator methods defined in Queryable, such as OfType and Cast, call this method. 他們將它傳遞MethodCallExpression表示LINQLINQ查詢。They pass it a MethodCallExpression that represents a LINQLINQ query.

CreateQuery<TElement>(Expression) CreateQuery<TElement>(Expression) CreateQuery<TElement>(Expression)

建構 IQueryable<T> 物件,這個物件可評估由指定的運算式樹狀架構所表示的查詢。Constructs an IQueryable<T> object that can evaluate the query represented by a specified expression tree.

public:
generic <typename TElement>
 System::Linq::IQueryable<TElement> ^ CreateQuery(System::Linq::Expressions::Expression ^ expression);
public System.Linq.IQueryable<TElement> CreateQuery<TElement> (System.Linq.Expressions.Expression expression);
abstract member CreateQuery : System.Linq.Expressions.Expression -> System.Linq.IQueryable<'Element>

類型參數

TElement

所傳回 IQueryable<T> 之項目的型別。The type of the elements of the IQueryable<T> that is returned.

參數

expression
Expression Expression Expression

代表 LINQLINQ 查詢的運算式樹狀架構。An expression tree that represents a LINQLINQ query.

傳回

IQueryable<TElement>

IQueryable<T>,可評估由指定的運算式樹狀架構所表示的查詢。An IQueryable<T> that can evaluate the query represented by the specified expression tree.

備註

注意

Expression屬性傳回之IQueryable<T>物件是否等於expressionThe Expression property of the returned IQueryable<T> object is equal to expression.

CreateQuery方法用來建立新IQueryable<T>物件,指定運算式樹狀架構。The CreateQuery method is used to create new IQueryable<T> objects, given an expression tree. 查詢所傳回的物件表示為特定的 LINQ 提供者相關聯。The query that is represented by the returned object is associated with a specific LINQ provider.

大部分的Queryable傳回可列舉結果的標準查詢運算子方法呼叫這個方法。Most of the Queryable standard query operator methods that return enumerable results call this method. 他們將它傳遞MethodCallExpression表示LINQLINQ查詢。They pass it a MethodCallExpression that represents a LINQLINQ query.

適用於