nerdexam
Microsoft

70-516 · Question #229

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Windows Communication Foundation (WCF) Data Services service. You add the following code segment. (Line numbers are…

The correct answer is A. Add the following code segment at line 07. LoadProperty(Object, String) Explicitly loads an object related to the supplied object by the specified navigation property and using the default merge option. UriKind Enumeration RelativeOrAbsolute The kind of the Uri is indeterminate. Absolute The Uri is an absolute Uri…

Implementing Data Access

Question

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Windows Communication Foundation (WCF) Data Services service. You add the following code segment. (Line numbers are included for reference only.) 02 Dim ctx As var = New NorthwindEntities(uri) 03 Dim categories As var = From c In ctx.Categories _ 04 Select c 05 For Each c ategory As var In categories 06 PrintCategory(category) 08 For Each product As var In category.Products 10 PrintProduct(product) 11 Next 12 Next You need to ensure that the Product data for each Category object is lazy-loaded. What should you do?

Options

  • AAdd the following code segment at line 07.
  • BAdd the following code segment at line 09.
  • CAdd the following code segment at line 07.
  • DAdd the following code segment at line 09.

How the community answered

(19 responses)
  • A
    74% (14)
  • B
    5% (1)
  • C
    16% (3)
  • D
    5% (1)

Explanation

LoadProperty(Object, String) Explicitly loads an object related to the supplied object by the specified navigation property and using the default merge option. UriKind Enumeration RelativeOrAbsolute The kind of the Uri is indeterminate. Absolute The Uri is an absolute Uri. Relative The Uri is a relative Uri.

Topics

#lazy loading#WCF Data Services#LoadProperty#entity relationships

Community Discussion

No community discussion yet for this question.

Full 70-516 Practice