What are DataContracts in WCF ?
I have an XML file , how can I create a DataContract for this?
What are DataContracts in WCF ? I have an XML file , how can
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The DataContract is how you specify the format of the data that your service will provide/accept.
If you’re used to working with .NET 2.0 Web Services and are familiar with the WSDL, you can think of it another way. The WSDL is primarily composed of two seperate WCF concepts:
The ServiceContract would compose the part of the WSDL that specified the service’s endpionts.
The DataContract would compose the part of the WSDL that specified the format of the data to be passed in and returned from the service.