Local sequence cannot be used in LINQ to SQL implementation of query operators except the Contains() operator

code:
var cpList2 = (from customerProduct in _context.customer_products
join controlPolice in controlPolices
on customerProduct.sales_ID equals controlPolice.sales_ID
where customerProduct.yenileme_no == controlPolice.yenileme_no
&& customerProduct.zeyil_no == controlPolice.zeyil_no
select customerProduct);

error:
Local sequence cannot be used in LINQ to SQL implementation of query
operators except the Contains() operator

solution:
var cpList = (from controlPolicy in controlPolicies
join customerProduct in _context.customer_products
on controlPolicy.sales_ID equals customerProduct.sales_ID
where controlPolicy.yenileme_no == customerProduct.yenileme_no
&& controlPolicy.zeyil_no == customerProduct.zeyil_no
select customerProduct);

source:
http://stackoverflow.com/questions/5936301/local-sequence-cannot-be-used-in-linq-to-sql-implementations-of-query-operators-e

search this blog (most likely not here)