DbExpressionBuilder.Filter Method (DbExpressionBinding, 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 Filter( this DbExpressionBinding input, DbExpression predicate )
Parameters
- input
-
Type:
System.Data.Entity.Core.Common.CommandTrees.DbExpressionBinding
An expression binding that specifies the input set.
- predicate
-
Type:
System.Data.Entity.Core.Common.CommandTrees.DbExpression
An expression representing a predicate to evaluate for each member of the input set.
Return Value
Type: System.Data.Entity.Core.Common.CommandTrees.DbFilterExpressionA new DbFilterExpression that produces the filtered set.
Exception | Condition |
---|---|
ArgumentNullException | input or predicate is null. |
ArgumentException | predicate does not have a Boolean result type. |