Define Service Contracts and Operation Contracts in WCF?

Service Contract – An interface that exposes the service operations is usually decorated with the service contract attribute. Always provide meaningful Namespace and Name to a service contract as shown in the example below.

Operation Contract – All methods in a service contract should have OperationContract attribute. You can also provide explicit Name, Action and ReplyAction as shown in the example below.

Tagged , . Bookmark the permalink.

Leave a Reply