Hi Pascal!

On Tue, Sep 16, 2008 at 1:25 PM, Pascal Craponne <[EMAIL PROTECTED]> wrote:

> Your analysis is good and you English understandable ;)
>
>
I'm glad for that. ^^

I think both options A and B can be used in Linq2SQL (using parameters... I
> don't remember which ones)
>

I don't understand, Do you refer to DataLoadOptions.LoadWith method?
example: DataLoadOptions.LoadWith<Employee>.LoadWith(e=>e.Orders)

If so, I used that in my project (Cuadernos de Campo
project<http://161.111.228.104/cuadernosenlared/extranet>,
excuse me for the spam ;-D) and it was a disappointment.

I hoped that a query like "db.Employee.Where(xxx)" would generate a sql wich
would retrieve all product data. But the truth was that a database access
was made for each employee to get it. DataLoadOptions behaves like a
post-script executed after the standar loading of linq2sql.

I mean, AFAIK the behaviour is not configurable by the programmer in
linq2sql. The retrieved data is only those which is  specified in the query.


> So, in theory, the EntitySet might be able to hold directly a set or load
> it on demand.
>

Yeah. It is also related with the recent thread about
Lazy-Loading<http://groups.google.com/group/dblinq/browse_thread/thread/283191499b74199f>
.

Maybe It would be interesting for you to take a look to the
DataContext.SetEntitySetsQueries(object entity). This method is called when
a new entity is being registered. This is the momment when all of his
EntitieSet properties are configured (but not loaded).
This code can be useful also to implementing the point A.4 point.

There is a Load() method on the EntitySet, and that's the purpose.
>

When the EntitySet.Load, EntitySet.GetEnumerator or any System.Linq
extensions methods are called, then the data is retreived from the database.

I'd like to take a look at the engine to see what are the best options to
> make the best implementation
>

Of course, I tried to implement it during the summer but I resigned since a
lot of archiectural decitions should be taken.


> (your suggestions sounding good anyway). I'll make an additional post here
> in a few days, hopefully.
>

Nice! take the time you need!
If you need something, just ask me.

Regards.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DbLinq" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/dblinq?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to