I’ve been trying to implement a custom ORM for our project and am interested to learn how LINQ to SQL or Entity Framework lazy load objects.
I read some about EntitySet and realized it has a Load() method. Does anyone know how exactly Load works? I’m assuming it should have a reference to DataContext (or ObjectContext in EF) to load the requested object(s).
Thanks. But I just realized proxy is used with POCO objects and if you use the designer generated code, no proxy is generated. In this case, I noticed a private (or maybe internal) field pointing to ObjectContext. So, the entity can talk to ObjectContext to query for more data if required.