伪代码:
SELECT * FROM 'table' WHERE ('date' < today) OR ('visible' = false)
Linq中如何实现OR操作?
你可以使用特定于语言的OR条件。在C#中:
var results = from row in table
where row.date < today || row.visible == false
select row;
如果您更喜欢方法语法:
var results = table.Where(row => row.date < today || row.visible == false);
Reed搞定了C#,这里是VB.Net的等效代码
Dim results = _
From row In table _
Where row.Date < today OrElse row.Visible = False