读书人

刚学LINQ amp; Entity Framework遇到两

发布时间: 2012-03-09 16:54:57 作者: rapoo

刚学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
[解决办法]

探讨

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

[解决办法]
好像 没有错, 再 检查 新编译一下。
[解决办法]
探讨
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

[解决办法]
提示错误信息是什么?

读书人网 >.NET

热点推荐