Select from following answers:- Use the Include method on the ObjectQuery object.

- Create an ObjectContext within each service method. Execute queries with the MergeOption set to AppendOnly.
- Set the LazyLoadingEnabled property of the ObjectContextOptions associated with the ObjectContext to False.
- All Above
When you know the exact shape of the graph of related entities that your application requires, you can use the Include method on the ObjectQuery to define a query path that controls which related entities to return as part of the initial query. When you define a query path, only a single request against the database is required to return all entities defined by the path in a single result set and all related entities of the type specified in the path are loaded with each object that the query returns.
Show Correct Answer
Source: MeasureUp.com | |
Alert Moderator