Microsoft
70-513 · Question #78
You are developing a Windows Communication Foundation (WCF) REST service to provide access to a library book catalog. The following code segment defines the service contract. (Line numbers are…
The correct answer is B. [WebGet(UriTemplate = "BookByTitle/{title}")]. See the full explanation below for the reasoning.
Question
You are developing a Windows Communication Foundation (WCF) REST service to provide access to a library book catalog. The following code segment defines the service contract. (Line numbers are included for reference only.) Library patrons want the ability to search the catalog by title. You need to ensure that the GetBookByTitle method is exposed as a service method. Which code segment should you insert at line 05?
Exhibit
Options
- A[WebGet(UriTemplate = "Book/{title}")]
- B[WebGet(UriTemplate = "BookByTitle/{title}")]
- C[WebGet(UriTemplate = "Book/{titleToSearch}")]
- D[WebGet(UriTemplate = "{titleToSearch}")]
How the community answered
(26 responses)- A4% (1)
- B81% (21)
- C12% (3)
- D4% (1)
Community Discussion
No community discussion yet for this question.
