This is kind of hypothetical as I'm thinking about how to design this. Consider this query with some literal integer values in the join criteria:
Select *
From LeftPeople l
Inner Join RightPeople r On r.RecordId = l.RecordId and r.ResultId = 3 and l.ResultId = 7
Would this be the correct equivilant in LINQ? It seems kind of a cludge if this would even work and am wondering if there's a better way. I suppose I could put it in the where criteria instead. What do you think?
var query = from leftPerson in LeftPeople
join rightPerson in RightPeople on
new { RecordId = leftPerson.RecordId, RightResultId = 3, LeftResultId = leftPerson.ResultId }
equals new { RecordId = rightPerson.recordid, RightResultId = rightPerson.ResultId , LeftResultId = 7 }
select new { LeftPerson = leftPerson, RightPerson = rightPerson };