Skip to content
Advertisement

What is the syntax for an inner join in LINQ to SQL?

I’m writing a LINQ to SQL statement, and I’m after the standard syntax for a normal inner join with an ON clause in C#.

How do you represent the following in LINQ to SQL:

Advertisement

Answer

It goes something like:

It would be nice to have sensible names and fields for your tables for a better example. 🙂

Update

I think for your query this might be more appropriate:

Since you are looking for the contacts, not the dealers.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement