Question - What is the usage of DataContracts in WCF?
Answer -
In WCF, we can communicate with the server from our client through a message. So messages will be going to and fro between server and client. For security purpose, we are serializing the messages sent across the wire.
"[DataContact]" attribute is given at class level to serialize the class by using "[Datamember]" attribute over properties.