Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- List<long> lstPA = new List<long>() { 2, 3 }; // the numbers can be added or removed
- var exp1 = Predicate.FalseExpression<posts>();
- exp1 = exp1.Or(x => x.post_author == 2);
- exp1 = exp1.Or(x => x.post_author == 3);
- var exp1 = Predicate.FalseExpression<posts>();
- foreach (long id in lstPA)
- {
- exp1 = exp1.Or(x => x.post_author == id);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement