I played around with null and DBNull without any luck. I have found that this WHERE clause causes the SqlCeExcrption:
WHERE ((@Title IS NULL) OR (v.Title=@Title)) The mere presence of the first condition causes the exception. I printed the ToTraceString() of the query and it gives this WHERE clause: WHERE (@Title IS NULL) OR ([Extent3].[Title] = @Title) If I paste the whole trace string into SQL Server Management Studio and run it against my SQL CE database I get the exception. This shows that Entity SQL is generating an invalid statement. It's unlikely that would be a bug, so it must be something I'm doing wrong, or something illegal I'm doing. But which? I'll keep searching and experimenting ... 2 hours already burnt. Greg