IdeaBlade DevForce 2010 Help Reference
Make(String,FilterOperator,Object) Method
See Also  Example Send Feedback
IdeaBlade.Linq Assembly > IdeaBlade.Linq Namespace > PredicateBuilder Class > Make Method : Make(String,FilterOperator,Object) Method



propertyName
The property name to use in the filter
filterOp
the filter operator
value
The filter value
Return a PredicateDescription from the filter information provided.

Syntax

Visual Basic (Declaration) 
Public Overloads Shared Function Make( _
   ByVal propertyName As String, _
   ByVal filterOp As FilterOperator, _
   ByVal value As Object _
) As PredicateDescription
Visual Basic (Usage)Copy Code
Dim propertyName As String
Dim filterOp As FilterOperator
Dim value As Object
Dim value As PredicateDescription
 
value = PredicateBuilder.Make(propertyName, filterOp, value)
C# 
public static PredicateDescription Make( 
   string propertyName,
   FilterOperator filterOp,
   object value
)
C++/CLI 
public:
static PredicateDescription^ Make( 
   String^ propertyName,
   FilterOperator filterOp,
   Object^ value
) 

Parameters

propertyName
The property name to use in the filter
filterOp
the filter operator
value
The filter value

Example

C#Copy Code
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();
}

Remarks

Use Make to build a dynamic predicate.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2013 All Rights Reserved.