首页 新闻 会员 周边

错误信息:此模式下不允许以递归方式获取可升级锁定

0
[已关闭问题] 关闭于 2011-10-13 13:42

var name = (from s in db.Products
orderby s.ID
select s.Name).Distinct();
ViewBag.Pname
= new SelectList(name);
if (!string.IsNullOrEmpty(pname))
{
var products
= from s in db.Products
where s.Name == pname
select s;
return View(products);
}
return View(db.Products.ToList());
第一次时加Distinct报“此模式下不允许以递归方式获取可升级锁定”这个错误,然后去掉Distinct就好了,然后加上Distinct再debug又没问题了,后来想bug重现都不行,请教这个问题的原因,谢谢

peter cheng的主页 peter cheng | 菜鸟二级 | 园豆:431
提问于:2011-05-24 11:52
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册