Class AndOrPredicate
A where clause joining two or more predicates with and or or.
public class AndOrPredicate : BasePredicate
- Inheritance
-
AndOrPredicate
- Inherited Members
Constructors
AndOrPredicate(Operator, params BasePredicate[])
Join predicates with a boolean connective.
public AndOrPredicate(Operator op, params BasePredicate[] predicates)
Parameters
opOperatorpredicatesBasePredicate[]The predicates to join.
AndOrPredicate(Operator, IEnumerable<BasePredicate>)
Join predicates with a boolean connective.
public AndOrPredicate(Operator op, IEnumerable<BasePredicate> predicates)
Parameters
opOperatorpredicatesIEnumerable<BasePredicate>The predicates to join.
Properties
Predicates
The predicates being joined.
public IEnumerable<BasePredicate> Predicates { get; }
Property Value
Methods
ToExpression(ParameterExpression)
Combine the joined predicates into one expression with AndAlso or OrElse.
public override Expression ToExpression(ParameterExpression paramExpr)
Parameters
paramExprParameterExpressionThe query's lambda parameter.
Returns
- Expression
An expression of type bool.
Exceptions
- Exception
The operator is neither
andnoror.
Validate(Type)
Validate every joined predicate against the entity type.
public override void Validate(Type entityType)
Parameters
entityTypeTypeThe type the query returns.