WCF Contract:

  • Defines what the service does.
  • Identifies the methods available.
  • Its Interface between client and the server. It’s a simple interface with some attribute.


  Data Contracts Message Contracts
Definition Data contract is a formal agreement between a service and a client that abstractly describes the data to be exchanged Message contracts describe the structure of SOAP messages sent to and from a service and enable you to inspect and control most of the details in the SOAP header and body
Describes Describes type of data

Describes structure of SOAP.

Message Contract is an abstraction over a SOAP message that allows you to explicitly dictate the structure of the underlying message.

Defines Data Structure Yes No
Generate Xml No Yes
Controls Controls content of SOAP message Controls structure of SOAP message