What is DataContract and ServiceContract?Explain
Answer Posted / sandeep
Service Contract:
Service contracts describe the operation that service can
provide. For Eg, a Service provide to know the temperature
of the city based on the zip code, this service is called as
Service contract. It will be created using Service and
Operational Contract attribute.
Data Contract:
Data contract describes the custom data type which is
exposed to the client. This defines the data types, that are
passed to and from service. Data types like int, string are
identified by the client because it is already mention in
XML schema definition language document, but custom created
class or data types cannot be identified by the client e.g.
Employee data type. By using DataContract we can make client
to be aware of Employee data type that are returning or
passing parameter to the method.
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
How to host WCF Self-Hosting?
Explain use of Endpoints in WCF Service?
do you know what is endpoint in wcf? : Wcf data services
Explain briefly different instance modes in wcf?
When is the msmqintegrationbinding?
What is the windows communication foundation?
What is the one-way mode in wcf?
Explain how to define a service as rest based service in wcf?
What are the protocols supported by wcf hosting environment?
Plz any one send the sharepoint interview question @ mossdev123@gmail.com
What are the types of contract available in wcf?
Why wcf service is used?
Why is there a requirement of wcf for the enhancement of various business services?
List the various protocols utilized in the messaging layer in wcf?
do you know where we can host wcf services? : Wcf data services