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
When was wcf introduced?
Explain wcf tcp binding type?
How do we customize data contract names for generics types?
What are the core components of wcf service?
WCF:What is it the Reliable session?
Do we have to use the relative addresses when hosting in the iis or the absolute addresses? Why?
Why wcf service is used?
What are the types of bindings in wcf?
Explain wcf?
Which standard binding could be used for a service that was designed to replace an existing asmx web service?
What are the different modes of communication in wcf?
What do you understand by the term impersonation?
Explain use of Endpoints in WCF Service?
What is transport reliability in wcf?
What is "per session" instance mode in wcf?