1
我有以下ADO.NET实体框架实体数据模型:如何在LINQ Where子句中搜索集合的集合?
我想找到所有的投保人既具有给定id的服务,也给定状态的关键词。
这LINQ不起作用:
Dim ServicesId As Integer = ...
Dim KeywordStatus As Integer = ...
Dim FoundPolicyholders = From p As Policyholder In db.PolicyholderSet.Include("Keywords").Include("Services") _
Where p.Services.Id = ServicesId _
And p.Keywords.Status = KeywordStatus _
Select p
WHERE子句不能搜索那样的p.Services和p.Keywords EntityCollections。
'ID' 是不 'System.Data.Objects.DataClasses.EntityCollection(中 ....服务)' 的成员。
什么是正确的LINQ语法来做我想要的?
函数“任何”是我需要的线索。谢谢。 – 2009-04-15 15:35:11