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
explain what is the difference wcf and web services? : Wcf data services
What is the address formats of the wcf transport schemas?
How many Instance modes is supported by WCF?
What are the different bindings supported by wcf?
explain wcf federated ws binding type? : Wcf data services
What is the service?
What is callback mode in wcf? Explain.
explain what is transport and message reliability? : Wcf data services
What is purpose of IsWrapped property in Message Contract in WCF?
Explain about msmq integration binding?
Explain briefly different instance modes in wcf?
tell me what was the code name for wcf? : Wcf data services
What is callback mode in wcf?
What is difference between wpf and wcf?
What is address header in wcf?