在Linq
或Linq to Sql
更准确地说:以下查询中的== null
和之间有区别吗?IsNullOrEmpty
From a in context.SomeTable
where a.SomeId.Equals(SomeOtherId)
&& a.SomeOtherColumn == null
Select new .....
&
From a in context.SomeTable
where a.SomeId.Equals(SomeOtherId)
&& string.IsNullOrEmpty(a.SomeOtherColumn)
Select new .....