DevForce Help Reference
Make(String,FilterOperator,Object) Method
Example 


The property name to use in the filter
the filter operator
The filter value
Return a PredicateDescription from the filter information provided.
Syntax
'Declaration
 
Public Overloads Shared Function Make( _
   ByVal propertyName As String, _
   ByVal filterOp As FilterOperator, _
   ByVal value As Object _
) As PredicateDescription
'Usage
 
Dim propertyName As String
Dim filterOp As FilterOperator
Dim value As Object
Dim value As PredicateDescription
 
value = PredicateBuilder.Make(propertyName, filterOp, value)

Parameters

propertyName
The property name to use in the filter
filterOp
the filter operator
value
The filter value
Remarks
Use Make to build a dynamic predicate.
Example
public void PredicateBuilderMake() {
  var mgr = new DomainModelEntityManager();

  var expr1 = PredicateBuilder.Make(typeof(Product), "UnitPrice", FilterOperator.IsLessThanOrEqualTo, 10);
  var expr2 = PredicateBuilder.Make(typeof(Product), "Discontinued", FilterOperator.IsEqualTo, false);

  var results = mgr.Products.Where(expr1.And(expr2)).ToList();
}
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

PredicateBuilder Class
PredicateBuilder Members
Overload List

Send Feedback