Created
January 12, 2018 22:02
-
-
Save hbulens/0d8b68bc3232192e1c1ebbaf2942c414 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var inner = PredicateBuilder.False<Product>(); | |
inner = inner.Or(p => p.Description.Contains ("foo")); | |
inner = inner.Or(p => p.Description.Contains ("far")); | |
var outer = PredicateBuilder.True<Product>(); | |
outer = outer.And(p => p.Price > 100); | |
outer = outer.And(p => p.Price < 1000); | |
outer = outer.And(inner); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment