求教:where 条件是不确定的条件,如何用sqlsugar写? 返回
SqlSugar
老数据
1
2265
悬赏:5 飞吻
where 条件是不确定的条件,条件个数也不确定,比如条件是: List<int> lsState,lsState 里的值 为{0},则条件 where x=1; lsState 里的值 为{1},where x=2;
lsState 里的值 为{2}where x=3 ;lsState 里的值 为{3},where x=2 or x=3;lsState 里的值 为{0,1},则条件 where x=1 or x=2; lsState 里的值 是一个定义的字典范围,可以循环,用sql的时候是 循环进行sql语句拼接,不知道sqlsugar如何写?
热忱回答(1)
-
传说哥 VIP0
2019/6/23用动态查询拼接了条件
0 回复