单项选择题
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. string 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?()
A. Add the WebInvoke(UriTemplate = "/Items/{id}",Method="DELETE") attribute to the operation.
B. Add the HttpDelete attribute to the operation.
C. Replace the string parameter with a RemovedActivityAction parameter.
D. Replace the return type with RemovedActivityAction.
相关考题
-
单项选择题
WindowsCommunicationFoundation(WCF)applicationusesadatacontractthathasseveraldatamembers.YouneedtheapplicationtothrowaSerializationExceptionifanyofthedatamembersarenotpresentwhenaserializedinstanceofthedatacontractisdeserialized.Whatshouldyoudo?()
A. Add the Known Type attribute to the data contract.Set a default value in each of the data member declarations.
B. Add the Known Type attribute to the data contract.Set the Order property of each data member to unique integer value.
C. Set the Emit Default Value property of each data member to false.
D. Set the Is Required property of each data member to true.
