Two simple queries - the exception occurs in :
matchings.Any(u => product.ProductId == u.ProductId)
What is wrong? If I write true
I was facing the same issue when writing the following query using collection and EF tables:
var result = (from listItem in list
join dbRecord in Context.MY_TABLE
on listItem.MyClass.ID equals dbRecord.ID
select new { dbRecord, listItem.SomeEnum }).ToList();
I could solve it by changing the source order in in:
var result = (from dbRecord in Context.MY_TABLE
join listItem in list
on dbRecord.ID equals listItem.MyClass.ID
select new { dbRecord, listItem.SomeEnum }).ToList();