How do I inner join multiple columns from the same tables via Linq?
For example:
I already have this…
join c in db.table2 on table2.ID equals table1.ID
I need to add this…
join d in db.table2 on table2.Country equals table1.Country
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can put your query inside a Where clause instead of using the join operator.
The join operator supports multiple clauses in VB.NET, but not C#.
Alternatively, you can use the ANSI-82 style of ‘SQL’ syntax, e.g.: