nerdexam
Microsoft

70-516 · Question #91

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to develop an application that uses the ADO.NET Entity Framework to model entities. You create an entity model as shown in the…

The correct answer is A. var people = context.People.Include. 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)

Querying Data

Question

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 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?

Exhibit

70-516 question #91 exhibit

Options

  • Avar people = context.People.Include
  • Bvar people = context.People.Except
  • Cvar people = context.People.Except
  • Dvar people = context.People.Include

How the community answered

(34 responses)
  • A
    79% (27)
  • B
    9% (3)
  • C
    9% (3)
  • D
    3% (1)

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)

Topics

#Entity Framework#eager loading#Include#navigation property

Community Discussion

No community discussion yet for this question.

Full 70-516 Practice