nerdexam
Microsoft

70-516 · Question #235

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to develop an application that uses LINQ to SQL. The application contains the following model. Each region contains a single…

The correct answer is B. Vendor.VendorlD = u.Customer.VendorlD. See the full explanation below for the reasoning.

Question

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to develop an application that uses LINQ to SQL. The application contains the following model. Each region contains a single vendor. Customers order parts from the vendor that is located in their region. You need to ensure that each row in the Customer table references the appropriate row from the Vendor table. Which code segment should you use?

Exhibit

70-516 question #235 exhibit

Options

  • ADim dc As SalesDataContext = New SalesDataContext( "..." )
  • BVendor.VendorlD = u.Customer.VendorlD
  • CDim dc As SalesDataContext - New SalesDataContext ( "..." )
  • DCustomer.VendorID = u.Vendor.VendorID
  • EDim dc As SalesDataContext = New SalesDataContext( "..." )
  • FVendor.Region = u.Customer.Region
  • GDim dc As SalesDataContext - New SalesDataContext( "...")
  • HCustomer.Region = u.Vendor.Region

How the community answered

(45 responses)
  • A
    7% (3)
  • B
    80% (36)
  • C
    2% (1)
  • E
    9% (4)
  • F
    2% (1)

Community Discussion

No community discussion yet for this question.

Full 70-516 Practice