日期:2014-05-17 浏览次数:20413 次
ViewBag.List = (from a in Member
join b in MemberInfo on a.MemberId equals b.MemberId into ab
from c in ab.DefaultIfEmpty(new MemberInfo() { RealName = "hehe" })
select new { a.MemberId, c.RealName }).ToList();
ViewBag.List = (from a in Member
join b in MemberInfo on a.MemberId equals b.MemberId into ab
from c in ab.DefaultIfEmpty()
select new { a.MemberId, RealName =c==null?"hehe":c.RealName }).ToList();