IQueryProvider.Execute IQueryProvider.Execute IQueryProvider.Execute Method

Definition

Overloads

Execute(Expression) Execute(Expression) Execute(Expression)

Executes the query represented by a specified expression tree.

Execute<TResult>(Expression) Execute<TResult>(Expression) Execute<TResult>(Expression)

Executes the strongly-typed query represented by a specified expression tree.

Execute(Expression) Execute(Expression) Execute(Expression)

Executes the query represented by a specified expression tree.

public:
 System::Object ^ Execute(System::Linq::Expressions::Expression ^ expression);
public object Execute (System.Linq.Expressions.Expression expression);
abstract member Execute : System.Linq.Expressions.Expression -> obj

Parameters

expression
Expression Expression Expression

An expression tree that represents a LINQ query.

Returns

The value that results from executing the specified query.

Remarks

The Execute method executes queries that return a single value (instead of an enumerable sequence of values). Expression trees that represent queries that return enumerable results are executed when their associated IQueryable object is enumerated.

Execute<TResult>(Expression) Execute<TResult>(Expression) Execute<TResult>(Expression)

Executes the strongly-typed query represented by a specified expression tree.

public:
generic <typename TResult>
 TResult Execute(System::Linq::Expressions::Expression ^ expression);
public TResult Execute<TResult> (System.Linq.Expressions.Expression expression);
abstract member Execute : System.Linq.Expressions.Expression -> 'Result

Type Parameters

TResult

The type of the value that results from executing the query.

Parameters

expression
Expression Expression Expression

An expression tree that represents a LINQ query.

Returns

TResult TResult TResult

The value that results from executing the specified query.

Remarks

The Execute method executes queries that return a single value (instead of an enumerable sequence of values). Expression trees that represent queries that return enumerable results are executed when the IQueryable<T> object that contains the expression tree is enumerated.

The Queryable standard query operator methods that return singleton results call Execute. They pass it a MethodCallExpression that represents a LINQ query.

Applies to