I am trying to write a linq to SQL lambda query which is equivalent to the below SQL query.
Select t.Task_Id
FROM taskSet ts
JOIN taskSet tsg ON tsGroup.SetId = ts.SetId
JOIN tasks t ON t.task_id = tsg.TaskId AND t.task_type_id = 10 AND t.row_status = 1 AND t.status = 0
WHERE ts.TaskId = @TaskId
I have reached till the below. Now if I try to add one more join and do the check for && condition it gives me error. Please help me out on how to proceed with this.
m_context.TaskSet
.Join( m_context.TaskSet,
ts => ts.SetId,
tsg => tsg.SetId,
(ts, tsg) => new {ts, tsg})