DbExpressionBuilder.Where Method (DbExpression, Func<DbExpression, DbExpression>)
Creates a new DbFilterExpression that filters the elements in the given input set using the specified predicate.
Assembly: EntityFramework (in EntityFramework.dll)
public static DbFilterExpression Where( this DbExpression source, Func<DbExpression, DbExpression> predicate )
Parameters
- source
-
Type:
System.Data.Entity.Core.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.Entity.Core.Common.CommandTrees.DbFilterExpressionA 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. |