Guest User

Untitled

a guest
Jan 17th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. if()
  2. {
  3. query = query.Where(....)
  4. }
  5.  
  6. if()
  7. {
  8. query = query.Where(....)
  9. }
  10.  
  11. query = query.Where(....).Where(....);
  12.  
  13. if(condition)
  14. {
  15. predicate.And(something);
  16. }
  17. if(otherCondition)
  18. {
  19. predicate.Or(somethingElse);
  20. }
  21. var result = source.Where(predicate);
  22.  
  23. var flg1 = cond1 == null? true : cond1;
  24. var flg2 = cond2 == null? true : cond2;
  25.  
  26. var result = query.Where(flg1 && flg2)
  27.  
  28. query.Where("field1=1 and field2=2");
Add Comment
Please, Sign In to add comment