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 is a Service Proxy in windows Communication Foundation?
How can you test a wcf application without creating a client application?
What is fault contracts in wcf?
What is the "contract" property of endpoint in wcf?
What are the 3 ways of implementing WCF(Windows Communication Foundation) concurrency?
What are the transport schemes supported by wcf? Give example of address for each scheme.
What are the transport schemas supported by wcf?
What is .svc file in wcf?
tell me what was the code name for wcf? : Wcf data services
What is the transport and message reliability?
What is msmq binding?
WCF:What is it the Teredo? How can we use it?
What are the types of messaging programs?
What are the attributes of Message Contract in WCF?
Describe the wcf architecture?