Folks,
I need to use Intersect on a LINQ to SQL query. However, I get an exception basically stating that I can't.
The code compiles fine, but LINQ to SQL gets angry.
Is there any way to replicate Intersect with LINQ to SQL?
Thanks in advance.
Folks,
I need to use Intersect on a LINQ to SQL query. However, I get an exception basically stating that I can't.
The code compiles fine, but LINQ to SQL gets angry.
Is there any way to replicate Intersect with LINQ to SQL?
Thanks in advance.
Here is an example of how to do this:
var coolColors = (from pen in mydb.Pens select pen.Color).Intersect
(from pencil in mydb.Pencils select pencil.Color);