nerdexam
Microsoft

70-516 · Question #200

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

Consuming and Exposing Data

Question

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create a Windows Communication Foundation (WCF) Data Services service. You add the following code segment. (Line numbers are included for reference only.) 02 var ctx = new NorthwindEntities(uri); 03 var categories = from c in ctx.Categories select c; 04 foreach (var category in categories) { 05 PrintCategory(category); 06 ... 07 foreach (var product in category.Products) { 08 ... 09 PrintProduct(product); 10 } 11 } 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 06:
  • BAdd the following code segment at line 08:
  • CAdd the following code segment at line 06:
  • DAdd the following code segment at line 08:

How the community answered

(38 responses)
  • A
    79% (30)
  • B
    5% (2)
  • C
    3% (1)
  • D
    13% (5)

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

#WCF Data Services#lazy loading#LoadProperty#related entities

Community Discussion

No community discussion yet for this question.

Full 70-516 Practice