?
inner join 模板:
var query = from x in db.T1
????????????join y in db.T2
????????????on x.Id equals y.Id
????????????select x;
?
left join模板:
?
var query = from x in db.T1
????????????join y in db.T2
????????????on x.yId equals y.Id into temp
????????????from ret in temp.DefalutIfEmpty()
????????????select new{ x.Id, ret};
?
经常记不住,这次把它记下来!
Linq to Sql/entity Join
原文:http://www.cnblogs.com/pengzhen/p/4522521.html