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 提供程序的详细信息,请参阅 MSDN 博客上的LINQ:生成 IQueryable 提供程序For more information about how to create your own LINQ provider, see LINQ: Building an IQueryable Provider on MSDN Blogs.

方法

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.

适用于

另请参阅