nerdexam
Microsoft

70-513 · Question #25

A class named TestService implements the following interface: [ServiceContract] public interface ITestService { [OperationContract] DateTime GetServiceTime(); } TestService is hosted in an ASP.NET…

The correct answer is C. Add this attribute to the GetServiceTime method. See the full explanation below for the reasoning.

Question

A class named TestService implements the following interface:

[ServiceContract] public interface ITestService { [OperationContract] DateTime GetServiceTime(); } TestService is hosted in an ASP.NET application. You need to modify the application to allow the GetServiceTime method to return the data formatted as JSON. It must do this only when the request URL ends in /ServiceTime. What should you do?

Options

  • AAdd this attribute to the GetServiceTime method.
  • BAdd this attribute to the GetServiceTime method.
  • CAdd this attribute to the GetServiceTime method
  • DAdd this attribute to the GetServiceTime method.

How the community answered

(30 responses)
  • A
    3% (1)
  • B
    7% (2)
  • C
    73% (22)
  • D
    17% (5)

Community Discussion

No community discussion yet for this question.

Full 70-513 Practice