How to: Explicitly Load POCO Entities

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

The examples in this topic show you how to explicitly load related objects by using the LoadProperty method on the ObjectContext. For an example of using lazy loading to access related objects, see How to: Use Lazy Loading to Load Related Objects. The LoadProperty method can be used with POCO entities and with entities that derive from EntityObject.

The examples in this topic use the POCO data classes that are defined in How to: Define POCO Entities, the AdventureWorksEntities class (derived from ObjectContext) that is created in How to: Define a Custom Object Context, and an AdventureWorks-based data model that is defined in How to: Customize Modeling and Mapping Files to Work with Custom Objects.


This example returns the first five Order objects and calls the LoadProperty method to explicitly load the related LineItem objects for each Order.

See Also