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 follo
basically LINQ join operator provides no benefit for SQL. I.e. the following query
var r = from dealer in db.Dealers
from contact in db.DealerContact
where dealer.DealerID == contact.DealerID
select dealerContact;
will result in INNER JOIN in SQL
join is useful for IEnumerable<> because it is more efficient:
from contact in db.DealerContact
clause would be re-executed for every dealer But for IQueryable<> it is not the case. Also join is less flexible.