Enumerating IEnumerable in EF6 in Debugger Problems "Children cannot be evaluated" error

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

If I request a specific DbSet and insert a breakpoint, trying to read the contents of IEnumerable will cause VS 2013 to tell me that children cannot be evaluated.

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

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

thanks

+7
linq asp.net-mvc entity-framework
source share
1 answer

Here is how it works now, I hope that it will be fixed at some point, but for now you should "ToList ()" through the clock windows. Urgh!

EF Team Triage: The main reason for this is the external problem with Lazy. We discussed the question of creating our own Lazy reinstallation to solve this problem, but at this stage it does not justify the efforts. If we see more complaints about this in the future, we will change our minds.

> The best workaround is to add ToList () or similar (either in code or as Watch) to see the results.

http://entityframework.codeplex.com/workitem/1898

+7
source share

All Articles