I Would like to build the dynamic Linq to Sql query for groupjoin clause where groupjoin will include multiple dynamic columns for joining.
I have looked the below artile for left join but it do not have the facility for multiple columns to join: How do I do a left outer join with Dynamic Linq?
Below is the query at compile time which i need to acheive dynamically:
`var source = lParent.GroupJoin(lChild,
p => new{ p.PID,p.CategoryId (These are dynamic columns)}
c => new{ c.PID,c.CategoryId (These are dynamic columns)}
(p, g) => new { Parent = p, Childs= g })
.SelectMany( p => p.Childs.DefaultIfEmpty(),
(p,g) => new { Parent=p.Parent, Childs=g});`
Thankyou.
Ashutosh.