nerdexam
Microsoft

70-516 · Question #104

How do you define a WCF Data Service query to grab the first 10 records. Options are something like:

The correct answer is A. DataServiceQuery<Order> selectedOrders = context.Orders.AddQueryOption("$top", "10"). Accessing Data Service Resources (WCF Data Services) DataServiceQuery<TElement>.AddQueryOption Method

Querying Data

Question

How do you define a WCF Data Service query to grab the first 10 records. Options are something like:

Options

  • ADataServiceQuery<Order> selectedOrders = context.Orders.AddQueryOption("$top", "10");
  • BDataServiceQuery<Order> selectedOrders = context.Orders.AddQueryOption("$filter", "10");
  • CDataServiceQuery<Order> selectedOrders = context.Orders.AddQueryOption("$select",
  • DDataServiceQuery<Order> selectedOrders = context.Orders.AddQueryOption("$expand",

How the community answered

(37 responses)
  • A
    81% (30)
  • B
    11% (4)
  • C
    5% (2)
  • D
    3% (1)

Explanation

Accessing Data Service Resources (WCF Data Services) DataServiceQuery<TElement>.AddQueryOption Method

Topics

#WCF Data Services#OData#$top query option#DataServiceQuery

Community Discussion

No community discussion yet for this question.

Full 70-516 Practice