LINQ Query - how sort and filter on eager fetch
问题 How do I do a eager query of a parent child relationship that: filters a on child fields sorts on both parent and child return a List or Parents with the children pre-populated If I try from p in _context.Parents.Include("children") join c in _context.childrenon p.Id equals c.ParentId where d.DeletedDate == null orderby p.Name ascending, c.Name select p Then I get the Parent object back but each Parent has NULL for children if I try from p in _context.Parents.Include("children") orderby p