nerdexam
Microsoft

70-516 · Question #250

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The application connects to a Microsoft SQL Server database. You create the classes shown in the…

The correct answer is C. var query = leagues.SelectMany(l => l.Teams. See the full explanation below for the reasoning.

Question

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The application connects to a Microsoft SQL Server database. You create the classes shown in the following exhibit. You add the following code segment to the application. (Line numbers are included for reference only.)

Exhibit

70-516 question #250 exhibit

Options

  • Avar query = leagues.Select(l => l.Teams.
  • Bvar query = leagues.Select(l => l.Teams.
  • Cvar query = leagues.SelectMany(l => l.Teams.
  • Dvar query = leagues.SelectMany(l => l.Teams.

How the community answered

(51 responses)
  • A
    4% (2)
  • B
    8% (4)
  • C
    76% (39)
  • D
    12% (6)

Community Discussion

No community discussion yet for this question.

Full 70-516 Practice