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

.NET Framework (current version)
 

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

Namespace:   System.Data.Common.CommandTrees.ExpressionBuilder
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

public static DbFilterExpression Where(
	this DbExpression source,
	Func<DbExpression, DbExpression> predicate
)

Parameters

source
Type: System.Data.Common.CommandTrees.DbExpression

An expression that specifies the input set.

predicate
Type: System.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.

Return Value

Type: System.Data.Common.CommandTrees.DbFilterExpression

A new DbQuantifierExpression that represents the Any operation.

Exception Condition
ArgumentNullException

source or predicate is null.

ArgumentNullException

The expression produced by predicate is null.

ArgumentException

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

.NET Framework
Available since 4.5
Return to top
Show: