我正在尝试查询该列为空的记录:
Dim UnassignedSubSvc =
(From c In CurrentContext.SubService
Where c.Product.ProductSubServiceId **is null**
Select c).ToList()
答案 0 :(得分:1)
Dim UnassignedSubSvc =
(From c In CurrentContext.SubService
Where Not c.ProductSubServiceId.HasValue
Select c).ToList()
Nullable类型使用HasValue
来表示它们包含非null值,所以简单地否定它就足够了。