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?

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. Option A
B. Option B
C. Option C
D. Option D

microsoft-exams

3 thoughts on “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?

  1. There is no descriptions like in exam, but it should return all the data
    implement the Gеt method whithout params, not Gеt with params

    D is wrong, because there already exists such method Gеt with param int id.
    You should choose between A and C.
    And the right answer is A, because it’s Iqueriable and the taks wants you to filter.
    You can’t filter IEnumirable before request. It will load all the database table first.

  2. B cannot be right: The expected return type is Book. The actual return type is List.
    It’s D.

    A & C are not ad hoc queries since they do not have a parameter. Also the syntax seems wrong, “All” should contain an Expression object (unless it’s an extension method I don’t know about)

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.