exam questions

Exam 70-487 All Questions

View all questions & answers for the 70-487 exam

Exam 70-487 topic 3 question 15 discussion

Actual exam question from Microsoft's 70-487
Question #: 15
Topic #: 3
[All 70-487 Questions]

DRAG DROP -
The GetExternalOrders() method must use members of the EntityClient namespace to query the database for all records in the InboundQueue entity.
You need to modify the GetExternalOrders() method to return the correct data.
You have the following code:

New EntityConnection EntityDataReader CommandBehavior
Which code segments should you include in Target1, Target2, Target3 and Target4 to complete the code? To answer, drag the appropriate code segments to the correct targets in the answer area. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
Each correct selection is worth one point.
NOTE:
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:
Box 1, Box 2: ExternalOrdersEtnities
The GetExternalOrders() method must use members of the EntityClient namespace to query the database for all records in the InboundQueue entity.

Box 3: ExecuteReader -
Box 4: SequentialAccess

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
nfgmaia
Highly Voted 5 years, 6 months ago
Target 4: Should be "SingleResult". Other similar questions use "SequentialAccess" because it's the only CommandBehaviour property available in the options. In this question particular case, "SingleResult" is more optimized for the query.
upvoted 11 times
tiger25
5 years, 4 months ago
Agreed.
upvoted 1 times
...
yuri_y
4 years, 11 months ago
The query is not expected to return only single row (while commandbehavior.SingleRow does). So answer seems to be ok
upvoted 2 times
mr_
4 years, 10 months ago
Bro - it is SingleResult, not SingleRow. SingleResult is for single result set (many rows), not single row.
upvoted 6 times
...
...
Dreamchaser1980
4 years, 8 months ago
I would use SequentialAccess because SingleResult only makes sense if the sql query specifies multiple queries. The resulting DataReader then returns multiple data sets. By using SingleResult only one result set is returned, NextResult will then return false.
upvoted 3 times
...
...
Jobair
Most Recent 4 years, 8 months ago
It seems to me using SequentialAccess may gain some perf benefits https://stackoverflow.com/questions/19895047/is-there-any-performance-gain-from-commandbehavior-sequentialaccess
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...