I have following tables
tasks  
id | name   | proj_id  
1  | task1  | 1  
2  | task2  | 1  
3  | task3  | 1  
projects  
id | name  
1  | sample proj1  
2  | demo project  
budget_versions  
id | version_name| proj_id  
1  | 50          | 1  
budgets  
id | cost  | budget_version_id | task_id  
1  | 3000  | 1                 | 2  
2  | 5000  | 1                 | 1  
I need to join these tables to get a result as below using entity framework
task_id | task_name | project_id | budget_version | budget_id | cost   
1       | task1     | 1          | 1              | 2         |5000  
2       | task2     | 1          | 1              | 1         |3000  
3       | task3     | 1          | NULL           | NULL      |NULL   
select tsk.id,tsk.name, tsk.project_id, bgtver.id, bgt.id, bgt.cost 
from TASK tsk
left outer join BUDGET_VERSIONS bgtver
on tsk.project_id= bgtver.project_id
left outer join BUDGETS bgt
on bgtver.id = bgt.budget_version_id  and tsk.id = bgt.task_id
where bgtver.id = 1
This is what I have tried so far
var budgetlists = _worker.Budgets.Get().GroupJoin(
    _worker.BudgetVersions.Get(),
    rb => rb.budget_version_id, 
    rbv => rbv.id,
    (rb, rbrbv) => new {rb, rbrbv}
).SelectMany(
    @t => @t.rbrbv.DefaultIfEmpty()
).GroupJoin(
    _worker.Tasks.Get(), 
    rbrbv => rbrbv.id, 
    tsk => tsk.id,
    (rbrbv, tskrb) => new {rbrbv, tskrb}
).SelectMany(
    @p => @p.tskrb.DefaultIfEmpty());