刚学LINQ & Entity Framework,遇到两个表连接查询的问题,请高手指教,我的错误代码如下!
private zysoftEntities ctxZySoft = null;
protected void Page_Load(object sender, EventArgs e)
{
ctxZySoft = new zysoftEntities();
var st1 = from c in ctxZySoft.Sys_Tree
join o in ctxZySoft.Sys_RolePerm on c.id equals o.P_PageCode into co
from d in co.DefaultIfEmpty()
select new
{
c,
d
};
}
}
这段代码红色部分提示错误!
[解决办法]
var st1 = from c in ctxZySoft.Sys_Tree
join o from ctxZySoft.Sys_RolePerm on c.id equals o.P_PageCode into co
from d in co.DefaultIfEmpty()
select new
[解决办法]
建议你看下这个:
http://www.cnblogs.com/lyj/archive/2008/01/24/1051495.html
[解决办法]