Question - What do you mean by contract in WCF? Explain the type of contracts too.
Answer -
The main objective of defining contracts is to make agree with both client and server for the same operations, structures, data types, etc. This is important to establish secure communication between the two. This is a formal agreement to define the platform neutrality and standards as well as what is done by the services. Here is given most common types of contracts that are frequently used within WCF technology.
- Service Contract
- Operation Contract
- Data Contract
- Message Contract
- Fault Contract