历数在调试程序问题和QUOT EF6 IEnumerable的;孩子无法评价"错误 [英] Enumerating IEnumerable in EF6 in debugger issues "Children could not be evaluated" error

查看:296
本文介绍了历数在调试程序问题和QUOT EF6 IEnumerable的;孩子无法评价"错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个新的ASP.NET MVC项目5和我尝试通过IdentityDbContext来查询code第一个数据库。

I have a new ASP.NET MVC 5 project and am attempting to query a code first database through a IdentityDbContext.

如果我查询特定DbSet并插入一个断点,试图读取了IEnumerable的内容会导致VS 2013告诉我,孩子无法评价。

If I query a particular DbSet and insert a breakpoint, attempting to read the contents of the IEnumerable will result in VS 2013 telling me that the children could not be evaluated.

我没有这个问题EF5 / MVC 4。

I did not have this issue in EF5 / MVC 4.

有某种改变,使在调试器评估IQueryables之类的不可能EF6?

Has something changed as to make evaluating IQueryables and the like impossible in the debugger in EF6?

感谢

推荐答案

这是如何工作的,现在,希望它会被固定在某一点,但现在你不得不了ToList()的东西通过观察窗口。 Urgh!

This is how it works for now, hopefully it will get fixed at some point, but for now you have to "ToList()" stuff via the watch windows. Urgh!

EF团队分流:这背后的根本原因是外部问题与懒惰。我们没有讨论创建我们自己的重新实施懒的要解决这个问题,但在这个阶段,似乎没有理由的努力。如果我们在未来看到更多这方面的投诉,我们会重新考虑。

EF Team Triage: The root cause behind this is an external issue with Lazy. We did discuss creating our own re-implementation of Lazy to workaround the issue but at this stage it doesn't seem to justify the effort. If we see more complaints about this in the future we will reconsider.

>最好的解决方法是添加了ToList()或类似的(无论是在
  code或作为观察)看到的结果。

<一个href=\"http://entityframework.$c$cplex.com/workitem/1898\">http://entityframework.$c$cplex.com/workitem/1898

这篇关于历数在调试程序问题和QUOT EF6 IEnumerable的;孩子无法评价&QUOT;错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆