Creating WCF Services

Whether the class can have the attribute "Service contract" and its methods "Operational contract". Or should they apply to the interface that the class was supposed to implement?

0


source to share


1 answer


You can put the ServiceContract and OperationContract attributes in a class, but this is considered bad practice. Better to abstract away from the interface and then put the attributes (contract-related, not implementation-related as they are in WCF) in the contract.



+1


source







All Articles