That is, I want to do this:
var lists = (from list in this.DB.Lists
select new
{
List = list,
Items = list.ListItems.ToList(),
}).ToList();
But, obviously, the Entity Framework doesn't support the ToList
extension method in the select clause.
What should I do? Any other method I've tried ends up sending a ton of queries to the database when iterating.