Why is an OperationContract attribute required in a WCF service?

Why is the OperationContract attribute required in the WCF utility function?

+3
source share
1 answer

The OperationContact attribute explicitly declares that the method is an operation in ServiceContract.

Why is this required? The main reason is that most of the WCF is a failure, and this is no different. WCF does not imply that simply because the method is part of the interface that you want to expose as a service operation. It remains for the programmer to decide (and explicitly indicate) what they want to open.

+6
source

Source: https://habr.com/ru/post/1717111/


All Articles