score:3

Probably LINQ-to-entities doesn't support the code which you've written in ProductByModelEqualityComparer. You can call AsEnumerable before calling Distinct, this will make Distinct executed via linq-to-objects but it won't be IQueryable anymore:

var enumerable = query.AsEnumerable().Distinct(new ProductByModelEqualityComparer()); return query; }

Related Articles