首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

刚学LINQ & Entity Framework,遇到两个表连接查询的有关问题,请高手指教,小弟我的异常代码如下

2012-03-09 
刚学LINQ & Entity Framework,遇到两个表连接查询的问题,请高手指教,我的错误代码如下!private zysoftEnti

刚学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

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

热点排行