DbExpressionBuilder.Where(DbExpression, Func<DbExpression,DbExpression>) Method

Definition

Creates a new DbFilterExpression that filters the elements in the given input set using the specified predicate.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Data::Common::CommandTrees::DbFilterExpression ^ Where(System::Data::Common::CommandTrees::DbExpression ^ source, Func<System::Data::Common::CommandTrees::DbExpression ^, System::Data::Common::CommandTrees::DbExpression ^> ^ predicate);
public static System.Data.Common.CommandTrees.DbFilterExpression Where (this System.Data.Common.CommandTrees.DbExpression source, Func<System.Data.Common.CommandTrees.DbExpression,System.Data.Common.CommandTrees.DbExpression> predicate);
static member Where : System.Data.Common.CommandTrees.DbExpression * Func<System.Data.Common.CommandTrees.DbExpression, System.Data.Common.CommandTrees.DbExpression> -> System.Data.Common.CommandTrees.DbFilterExpression
<Extension()>
Public Function Where (source As DbExpression, predicate As Func(Of DbExpression, DbExpression)) As DbFilterExpression

Parameters

source
DbExpression

An expression that specifies the input set.

predicate
Func<DbExpression,DbExpression>

A method representing the predicate to evaluate for each member of the input set. This method must produce an expression with a Boolean result type that provides the predicate logic.

Returns

A new DbQuantifierExpression that represents the Any operation.

Exceptions

source or predicate is null.

-or-

The expression produced by predicate is null.

The expression produced by predicate does not have a Boolean result type.

Applies to