我试图弄清楚如何在subsonic 3Linq中使用where blah=blah或blah=blah2进行查询,但我搞不清楚。我现在的查询是这样的:
var ddFaxNumbers = from f in rf_faxnumber.All().Where(f => f.assigned == null).Where(f => f.location == currentFaxNumberRecordData.location)
select f;这是一个带有更新面板的页面,当用户单击编辑时,我会显示两个下拉列表,一个用于位置,另一个用于电话号码。当前电话号码已分配,并在数据库表中如此标记,因此当我尝试绑定下拉列表时,它会抛出一个错误,因为结果不包含当前分配的号码。我需要能够像这样查询表:
select * from numbers where assigned == null or number == currentnumber and location=selecteLocation.我在SS语法中搞不懂的是如何执行查询的OR部分。我没有看到.or,所以这是可能的吗?提前感谢您的帮助。
琼恩
发布于 2009-11-07 02:32:17
你应该能够做到:
var ddFaxNumbers = from f in rf_faxnumber.All()
where (f.assigned == null || f.location == currentFaxNumberRecordData.location)
select f;https://stackoverflow.com/questions/1689393
复制相似问题