DataReader Command Error

edited April 2012
Using a EntityFramework 4.0 assembly datasource, this query (and even a .take(50))
var q = twOrders.Where (o => o.Errors != null);
q.Dump();
gives me the following exception
There is already an open DataReader associated with this Command which must be closed first.

I can resolve by shaping with .Select or setting LoazyLoading to false.....whats the deal here?

I am pretty fluent with Linq to SQL inside LinqPAD but just starting to use EF assembly source, very odd behavior/differences. Where can we find some more info/examples how to use EF assembly versus LinqtoSQL inside LinqPad?

Thanks
Mike

Comments

  • Is there anything special about your typed ObjectContext? As I understand, LazyLoading is on by default in Entity Framework and I can't reproduce this when I query an EDM that I create in Visual Studio.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!