Before reading this article, please go through the following articles:
  1. Day 1 - WCF Introduction and Contracts
  2. Day 2: WCF Fault Contacts
  3. Day 3: WCF Message Exchange Patterns

DataContract

Data contracts are the conceptual agreement of the format and structure of the data in the message exchanged between a service and client. It is a format of data passed to and from the service operations. It defines the structure and types of data exchanged in service messages.

DataContractAttribute

The DataContractAttribute is defined in the System.Runtime.Serialization namespace. It is used to declare a type as a DataContract.
Properties of DataContractAttribute
DataContractAttribute in WCF

DataMemberAttribute

The DataMemberAttribute is also the part of the System.Runtime.Serialization namespace. It is applied to the members and it is used to declare that the members should be included in the serialization.
Properties of DataMemberAttribute
DataMemberAttribute in WCF
Note
Sample Code
Next >> WCF - Difference Between Service Application and Service Library: Day 5