更新时间:2022-05-30 23:05:20
您应该能够执行以下操作,以获取符合任何条件的计划以及其父对象和祖父母对象:
You should be able to do something like this to get the plans which meet whatever criteria, along with their parent and grandparent objects:
// results is an anonymous type with properties Quote, Rate, Plan
var results = from q in quotes
from r in q.Rates
from p in r.Plans
where p.Id < 500 /* whatever criteria */
select new
{
Quote = q,
Rate = r,
Plan = p
};