Two simple queries - the exception occurs in :
matchings.Any(u => product.ProductId == u.ProductId)
What is wrong? If I write true
instead it all is good.
var matchings = (from match in db.matchings
where match.StoreId == StoreId
select match).ToList();
var names = (from product in db.Products
where matchings.Any(u => product.ProductId == u.ProductId)
select product).ToList();