我希望能够查询父实体并过滤子集合的内容。例如,我有一个OrderHeaders集合。我想使用LINQ查询此集合以返回所有OrderHeaders,但我只希望包含一些相关的OrderDetail行。我最好寻找一种解决方案,我可以在单个LINQ语句中完成所有这些操作。以下控制台应用对此进行了演示。usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;namespaceLINQ{classProgram{staticvoidMain(string[]args){Listorders=GetO