8,497
社区成员
发帖
与我相关
我的任务
分享
var q = (from a in DBUtility.DB.Productions
join b in DBUtility.DB.Projects on a.Id equals b.ProductionId
join c in DBUtility.DB.Plays on b.PlayId equals c.Id
join d in DBUtility.DB.PlayerMedias on c.Id equals d.PlayerId
where (a.Id == id) && (d.PlayerId == null)
select new{
});
return q.ToList();
select a.*,b.*,c.*,d.* from
dbo.Production a left join
dbo.Project b
on a.Id=b.ProductionId left join
dbo.Play c
on b.PlayId=c.Id left join
dbo.PlayerMedia d
on c.Id=d.PlayId
where a.id=xx and d.PlayerId is null
var q = (from a in DBUtility.DB.Productions
join b in DBUtility.DB.Projects on a.Id equals b.ProductionId into x
from bx in x.DefaultIfEmpty()
join c in DBUtility.DB.Plays on bx.PlayId equals c.Id into y
from cy in y.DefaultIfEmpty()
join d in DBUtility.DB.PlayerMedias on cy.Id equals d.PlayerId into z
from dz in z.DefaultIfEmpty()
where (a.Id == id) && (dz.PlayerId == null)
select new{
});
return q.ToList();
var li =s1.Join(s2,temp1 => temp1.AID, temp2 => temp2.AID,(temp1, temp2) => new { temp1.AID, temp1.AName, temp2.BID, temp2.BName }).Join(......);
日奶奶何来滴:var li =s1.Join(s2, temp1 => temp1.AID, temp2 => temp2.AID, (temp1, temp2) => new { temp1.AID, temp1.AName, temp2.BID, temp2.BName });