You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to develop an application
that uses the ADO.NET Entity Framework to model entities. You create an entity model as shown in
the following diagram. You need to ensure that all Person entities and their associated
EmailAddresses are loaded.
Which code segment should you use?
A.
Dim people = contexc.People.Include (“EmailAddresses”).ToList()
B.
Dim people = contexc.People.Except
(New ObjectQuery(Of Person)(“Person.EmailAddresses”, context)).ToList()
C.
Dim people = context.People.Except
(New ObjectQuery(Of Person)(“EmailAddresses”/ context)).ToList()
D.
Dim people = context.People.Include (“Person.EmailAddresses”).ToList()
Explanation:
CHAPTER 6 ADO.NET Entity Framework
Lesson 1: What Is the ADO.NET Entity Framework?
Lazy Loading vs. Explicit Loading vs. Eager Loading (page 384)
http://msdn.microsoft.com/en-us/library/bb896272.aspx