.net L2S从父对象查询子对象(在1-many关系中)

.net L2S从父对象查询子对象(在1-many关系中),.net,linq-to-sql,.net,Linq To Sql,我需要将返回的查询维护为r I.e.IEnumerable如果我正确理解了您的问题,那么我们正在寻找类似的查询 var obj = from r in db.ParentTables where r.ChildTable.Count > 0 // && How can we get the Child table data by parsing value by query string.? for eg: r.ChildTable.Language=

我需要将返回的查询维护为r I.e.IEnumerable

如果我正确理解了您的问题,那么我们正在寻找类似的查询

var obj = from r in db.ParentTables
          where r.ChildTable.Count > 0 // &&  How can we get the Child table data by parsing value by query string.? for eg: r.ChildTable.Language= English
          select r;

我很抱歉,但那没用。。。它将返回所有子记录,即使它们不符合条件。
var obj = from r in db.ParentTables
          where r.ChildTable.Any(c => c.Language = "English")
          select r;
var obj = from r in db.ParentTables
          where r.ChildTable.Any(c => c.Count() > 0 && c.Language == "English")
          select r;