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
This is the only way I was able to get it to work (in c#).
var qry = from t1 in table1
join t2 in table2
on new {t1.ID,t1.Country} equals new {t2.ID,t2.Country}
...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With