LINQ: Split Where OR conditions

后端 未结 3 655
盖世英雄少女心
盖世英雄少女心 2021-01-18 23:35

So I have the following where conditions

sessions = sessions.Where(y => y.session.SESSION_DIVISION.Any(x => x.DIVISION.ToUpper().Contains(SearchContent         


        
3条回答
  •  北荒
    北荒 (楼主)
    2021-01-19 00:04

    .Where() assumes logical AND and as far as I know, there's no out of box solution to do it. If you want to separate OR statements, you may want to look into using Predicate Builder or Dynamic Linq.

提交回复
热议问题