IQueryProvider 介面

定義

定義方法來建立並執行 IQueryable 物件所描述的查詢。Defines methods to create and execute queries that are described by an IQueryable object.

public interface class IQueryProvider
public interface IQueryProvider
type IQueryProvider = interface
Public Interface IQueryProvider
衍生

備註

IQueryProvider介面適用于查詢提供者的實作為。The IQueryProvider interface is intended for implementation by query providers.

如需如何建立您自己的 LINQ 提供者的詳細資訊,請參閱 linq:建立 IQueryable 提供者For more information about how to create your own LINQ provider, see LINQ: Building an IQueryable Provider.

方法

CreateQuery(Expression)

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

CreateQuery<TElement>(Expression)

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

Execute(Expression)

執行指定之運算式樹狀架構所代表的查詢。Executes the query represented by a specified expression tree.

Execute<TResult>(Expression)

執行由指定之運算式樹狀架構所代表的強型別查詢。Executes the strongly-typed query represented by a specified expression tree.

適用於

另請參閱