LLBLGen 3.0, Entity Framework, LinqPad

Posts   
 
    
chand
User
Posts: 72
Joined: 05-Aug-2007
# Posted on: 09-Sep-2010 18:33:10   

May it is a question to Linqpad team. But I would like to understand the problem better before asking them.

We are using "proxy friendly poco entities" preset for code generation.

When we try to use these generated classes via linqpad we are seeing strange behavior.

Calling Orders.First() in linqpad, is causing that tool to load all the related entities of the orders and finally load the entire data store

It is not happening if we use default preset.

Any insight would be helpful.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 09-Sep-2010 20:29:04   

If you run the query in a simple console app, do you see the same behavior? If you switch OFF lazy loading, do you see the same thing? (perhaps linqpad triggers lazy loading through reflection, not sure).

Frans Bouma | Lead developer LLBLGen Pro
chand
User
Posts: 72
Joined: 05-Aug-2007
# Posted on: 10-Sep-2010 18:34:46   

Lazy loading has no affect on this behavior. My console tests are fine.

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 10-Sep-2010 18:57:51   

Lazy loading has no affect on this behavior.

On what basis did you make the above assumption?

chand
User
Posts: 72
Joined: 05-Aug-2007
# Posted on: 10-Sep-2010 23:37:45   

I generated 'proxy friendly poco' code for Northwind database with and without lazyloading enabled.

I made the following call in linqpad

Orders.First()

I see the same results in both the cases.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 11-Sep-2010 13:03:27   

Well, I don't know why everything is fetched, if lazy loading isn't 'an issue', as how would the code otherwise fetch the data? Did you contact Joe about this issue in linqpad?

Frans Bouma | Lead developer LLBLGen Pro