Cross connect issue with linq2sql

I have the following LINQ2SQL query:

From pc In DBContext.ProcessCodes Join c In DBContext.Cells On pc.idCell Equals c.idCell Where pc.idType = "Cars" AndAlso pc.Active = True AndAlso c.Active = True Select c 

For some reason, I get a cross join (Cartesian product) when I think I need to get an inner join. I get the same if I do a few From with a key mapping in where.

What am I doing wrong?

+4
source share
1 answer

I think this will help you:

 From pc In DBContext.ProcessCodes From c In DBContext.Cells Where pc.idType = "Cars" AndAlso pc.Active = True AndAlso c.Active = True Select c 
0
source

All Articles