Hi All, What are DataContracts in WCF ? I have an XML file , how can I create a DataContract for this?
+1
A:
See this --> http://www.arquitecturadesoftware.org/blogs/hugobatista/archive/2005/11/06/wcf-basics-data-contracts.aspx
Bhaskar
2009-07-01 13:01:02
+3
A:
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.
Justin Niessner
2009-07-01 13:04:04