nerdexam
Microsoft

70-516 · Question #164

Drag and Drop Question The user interface requires that a paged view be displayed of all the products sorted in alphabetical order. The user interface supplies a current starting index and a page…

The correct answer is A. .OrderBy(x => x.Name) C. .Skip(startIndex) D. .Take(pageSize). See the full explanation below for the reasoning.

Question

Drag and Drop Question The user interface requires that a paged view be displayed of all the products sorted in alphabetical order. The user interface supplies a current starting index and a page size in variables named startIndex and pageSize of type int. You need to construct a LINQ expression that will return the appropriate Parts from the database from an existing ContosoEntities context object named context. You begin by writing the following expression:

context.Parts Which query parts should you use in sequence to complete the expression? (To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.)

Exhibit

70-516 question #164 exhibit

Options

  • A.OrderBy(x => x.Name)
  • B.Skip(pageSize)
  • C.Skip(startIndex)
  • D.Take(pageSize);
  • E.Take(startIndex)

How the community answered

(50 responses)
  • A
    76% (38)
  • B
    8% (4)
  • E
    16% (8)

Community Discussion

No community discussion yet for this question.

Full 70-516 Practice