Can a class have a "Service Contract" attribute and its methods "Operation Contract". Or do these need to be applied to an interface which the class would have to implement?
+1
A:
You can place the ServiceContract and OperationContract attributes on a class, but that is considered bad practice. It's better to abstract out to an interface and then place the attributes (that are contract related, not implementation related, as those do exist in WCF) on the contract.
casperOne
2009-01-07 21:17:35