Rom*_*man 1 nhibernate fluent-nhibernate
如何使用DetachedCriteria实现此查询:
Select * from
MyTable
Where
(conditionA = true) or
(conditionB = true) or
(conditionC = true) or
(conditionD = true)
Run Code Online (Sandbox Code Playgroud)
像这样:
DetachedCriteria.For<MyTable>()
.Add(Restrictions.Eq("conditionA", true) ||
Restrictions.Eq("conditionB", true) ||
Restrictions.Eq("conditionC", true) ||
Restrictions.Eq("conditionD", true));
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2002 次 |
| 最近记录: |