Microsoft
70-513 · Question #318
You are creating a Windows Communication Foundation (WCF) service that implements operations in a RESTful manner. You need to add a delete operation. You implement the delete method as follows: void…
The correct answer is A. Add the WebInvoke(UriTemplate="/Items/{id}", Method="DELETE"). See the full explanation below for the reasoning.
Question
You are creating a Windows Communication Foundation (WCF) service that implements operations in a RESTful manner. You need to add a delete operation. You implement the delete method as follows:
void DeleteItems(string id); You need to configure WCF to call this method when the client calls the service with the HTTP DELETE operation. What should you do?
Options
- AAdd the WebInvoke(UriTemplate="/Items/{id}", Method="DELETE")
- BAdd the HttpDelete atribute to the operation
- CReplace the string parameter with a RemovedActivityAction parameter
- DReplace the return type with RemovedActivityAction.
How the community answered
(39 responses)- A74% (29)
- B8% (3)
- C3% (1)
- D15% (6)
Community Discussion
No community discussion yet for this question.