.Include() .Where() .Select() in Linq to Entities Query
问题 I have a Linq query that queries the following tables: Tasks with a one-to-many link to: TaskLinks and TaskLinks has a one-to-one link to a Table called Entities. I am trying to select the task, eager load (via .Include) the TaskLinks and select the Entity linked to the TaskLink. But I need to filter the Task (by Access Level int) and the TaskLinks so that I don't include any Inactive (bool) records. Here is my Linq query: Tasks.Where(t => t.AccessLevel <= 5) .Include(tl => tl.TaskLinks.Where