Returns an Expression{Func{T}} representing the predicate.
Syntax
Parameters
- predicate
Type Parameters
- T
Example
C# | Copy Code |
---|
public void UsingToPredicate() {
var expr1 = new PredicateDescription(typeof(Product), "UnitPrice", FilterOperator.IsGreaterThanOrEqualTo, 24);
var exprFunc = expr1.ToPredicate<Product>();
var results = manager.Products.Where(exprFunc).ToList();
} |
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