Why is ServiceBehavior an attribute of a service class and not a contract?

I found many places where people point out that ServiceBehavior should be an attribute of a service class, not a contract, and that definitely looks like this. Why is this?

+3
source share
1 answer

Since it deals with the details of the implementation of the service and is not part of the contract .

Behaviors such as session, re-recording ... all deal with the implementation, so you can have the same contract (interface), but different implementations exposed at different endpoints.

+2
source

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


All Articles