tags:

views:

145

answers:

3

Hi All, What are DataContracts in WCF ? I have an XML file , how can I create a DataContract for this?

+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
A: 

How about referring a good book...

Hemant