Monday, 1 April 2013

Cannot compare elements of type 'System.Collections.Generic.List

We may get an exception when we are working with lamda expression as follows.

Cannot compare elements of type 'System.Collections.Generic.List`1'. Only primitive types, enumeration types and entity types are supported.
The solution to resolve this issue is, make sure don't have any null condition checks in the where clause.