日期:2014-05-17 浏览次数:20657 次
var query = from a in data.A join b in data.B on a.bid equals b.id into ab from r1 in ab.DefaultIfEmpty() join c in data.C on r1.cid equals c.id into bc from r2 in bc.DefaultIfEmpty() join d in data.D on r2.did equals d.id into cd from r3 in cd.DefaultIfEmpty() join e in data.E on r3.eid equals e.id into ce from r4 in ce.DefaultIfEmpty() select new Signature { Id = a.Id, Name = r1.Name, Pro = r2.Pro, IpAdd = r3.IpAdd }; IList<Signature> list = query.Take(pageSize).Skip((page - 1) * pageSize).ToList();//在这句报错 return list;
var query = from a in data.A join b in data.B on a.bid equals b.id into ab from b in ab.DefaultIfEmpty() join c in data.C on b.cid equals c.id into bc from c in bc.DefaultIfEmpty() join d in data.D on c.did equals d.id into cd from d in cd.DefaultIfEmpty() join e in data.E on d.eid equals e.id into ce from e in ce.DefaultIfEmpty() select new Signature { Id = a.Id, Name = b==null?"":b.Name, Pro = c==null?"":c.Pro, IpAdd = d==null?"":d.IpAdd };