i want to do left outer join in Dynamic Linq, but i can't get the syntax right. In SQL it would look like this:
SELECT col1, col2, col3 from tableA as a
LEFT OUTER JOIN tableB as b on a.col1 = b.col1 AND a.col2 = b.col2 AND a.col3 = 1
In dynamic linq i tried this:
dbContext.tableA
.GroupJoin(tableB, col1 == tableA.col1 && col2 == tableA.col2 && col3 == 1)
.Select('new(col1, col2, col3)');
The third join parameter (column) is just hard coded, because it doesn't come from tableB. What is the correct linq code?
EDIT: It's not a duplicate question. I am looking for syntax that works with dynamic LINQ, not with normal linq