110,565
社区成员
发帖
与我相关
我的任务
分享
select *
from table1
left join table2 on table1.Id = table2.empId
left join table3 on table2.deptId = table3.deptId
where table1.id > 10
select *
from table1
left join table2 on table1.Id = table2.empId
left join table3 on table1.deptId = table3.deptId
where table1.id > 10
//1 .
DbContext db=new DbContext ();
var q=from t1 in db.Table1
join t2 in db.Table2
on t1.Id equals t2.empId
join t3 in db.Table3
on t2.deptId equals t3.detpId
where t1.id>10
select new {t1.id,t1......}
//2
DbContext db=new DbContext ();
var q=from t1 in db.Table1
join t2 in db.Table2
on t1.Id equals t2.empId
join t3 in db.Table3
on t1.deptId equals t3.detpId
where t1.id>10
select new {t1.id,t1......}