One of the things before the .
is null
. Find out which.
The ToList
causes most of the query to run as LINQ to Objects which has exactly C# semantics. Without ToList
most runs in the database which has different semantics for NULL
values.
Probably, you should both understand what is null and run the query in the database.