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
What are WCF contracts?
How can we achieve operation overloading in WCF service?
Explain the difference between transport and message level security.
What is difference between wcf and wpf?
How can we create proxy for the wcf service?
Is the msmqintegrationbinding used the msmq.formatname scheme or the net.msmq scheme?
Explain abcs of endpoint?
Describe the various endpoints in wcf?
do you know what is address in wcf and how many types of transport schemas are there in wcf? : Wcf data services
What are the advantages of hosting wcf services in iis as compared to self hosting?
Elucidate on the various contracts in wcf?
What are the different types of transaction managers supported by wcf?
What are the wcf service endpoints?
What is the use of the was(windows activation service) compared to other hosting?
What is fault contracts in wcf?