Class AnyAllPredicate
A where clause that quantifies over a collection navigation property - "any order detail costs more than 100", "all of them shipped".
public class AnyAllPredicate : BasePredicate
- Inheritance
-
AnyAllPredicate
- Inherited Members
Constructors
AnyAllPredicate(Operator, object, BasePredicate)
Quantify a predicate over a collection navigation property.
public AnyAllPredicate(Operator op, object exprSource, BasePredicate predicate)
Parameters
opOperatorexprSourceobjectThe path to the collection navigation property.
predicateBasePredicateThe predicate each item is tested against.
Properties
ExprSource
The collection navigation property being quantified over, as the client wrote it.
public object ExprSource { get; }
Property Value
NavPropBlock
The resolved navigation property. Set by Validate(Type); null before it runs.
public PropBlock? NavPropBlock { get; }
Property Value
Predicate
The predicate applied to each item of the collection.
public BasePredicate Predicate { get; }
Property Value
Methods
ToExpression(ParameterExpression)
Build a call to Enumerable.Any or Enumerable.All over the navigation property.
public override Expression ToExpression(ParameterExpression paramExpr)
Parameters
paramExprParameterExpressionThe query's lambda parameter.
Returns
- Expression
An expression of type bool.
Validate(Type)
Resolve the navigation property and validate the inner predicate against the collection's item type.
public override void Validate(Type entityType)
Parameters
entityTypeTypeThe type the query returns.
Exceptions
- Exception
The path is not a property, or names something other than a collection navigation property.