DevForce Help Reference
And Method (DynamicQueryExtensions)
Example 


PrecicateDescription to be ANDed with the current predicate
Returns CompositePredicateDescription which represents a conditional AND operation of the current PredicateDescription with another.
Syntax

Parameters

predicate
other
PrecicateDescription to be ANDed with the current predicate

Return Value

A CompositePredicateDescription representing multiple predicates
Exceptions
ExceptionDescription
System.ExceptionPredicateDescriptions can only be combined if their InstanceTypes are the same
Example
public void DynamicQueryAnd() {
  var baseQuery = EntityQuery.Create(typeof(Customer));
  var expr1 = new PredicateDescription("Country", FilterOperator.IsEqualTo, "Mexico");
  var expr2 = new PredicateDescription("CompanyName", FilterOperator.StartsWith, "A");
  var list = manager.ExecuteQuery(baseQuery.Where(expr1.And(expr2)));
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

DynamicQueryExtensions Class
DynamicQueryExtensions Members

Send Feedback