exam questions

Exam 70-487 All Questions

View all questions & answers for the 70-487 exam

Exam 70-487 topic 4 question 7 discussion

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

You need to implement the Get() method in the bookstore Web API application to be able to find books by using an ad hoc query.
Which method should you use?
A.

B.

C.

D.

Show Suggested Answer Hide Answer
Suggested Answer: B
Compare to the Delete method from the scenario:

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, 8 months ago
Correct answer is A. 1) We want to implement the Get() method (not the Get(int id) method). 2) Use IQueryable if you have to run ad-hoc queries against a data source.
upvoted 30 times
...
abalone
Highly Voted 5 years, 8 months ago
i think answer is A: https://vceguide.com/which-method-should-you-use-8/
upvoted 25 times
dosper
5 years, 8 months ago
it's correct https://docs.microsoft.com/en-us/aspnet/web-api/overview/odata-support-in-aspnet-web-api/supporting-odata-query-options
upvoted 10 times
...
...
sti88
Most Recent 4 years, 8 months ago
A is the answer
upvoted 3 times
...
Dev666
4 years, 10 months ago
"A" as need to be IQueryable if you have to run ad-hoc queries against a data source.
upvoted 6 times
...
mr_
5 years ago
IMO answer A. I think that the most important thing here is requirement 'ad hoc query' which clearly suggests OData query expression and answer A. Other ones seem to be wrong for many reasons.
upvoted 7 times
...
Karel_Gott
5 years, 4 months ago
This question is weird since implementation from answer D is already listed in the code snippets of the assignment. So what is this question all about? For me, it should be a D option, but I am confused..
upvoted 2 times
Karel_Gott
5 years, 4 months ago
I was wrtong, it's clearly A.
upvoted 6 times
...
...
tiger25
5 years, 5 months ago
Answer clearly A hence only this represents ad-hoc query
upvoted 10 times
...
supersunny
5 years, 6 months ago
A is the right answer here since the question says books not a book or a particular book.
upvoted 5 times
...
MichaelDelGanzo
5 years, 8 months ago
B is not the right answer. This method will give build errors because the return type of the method doesn't match the returned result (instance of Book and List<Book>). The correct answer is D.
upvoted 12 times
...
seanlim
5 years, 8 months ago
D might be answer, please look at API return type
upvoted 2 times
Jobair
4 years, 10 months ago
need to support adHoq query, A should be the ansqer
upvoted 6 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 ...