It is possible to annotate a class — the concrete service implementation — with the
[ServiceContract] attribute and its methods with the
[OperationContract] attribute. However, there are several reasons why this is not recommended. One reason is that you will mix the "outside world" (the service contract) with the "inside world" (your implementation code), and this breaks the rule about having explicit boundaries. You should always decouple the abstract service definition from the concrete implementation, if you want to produce production code.
- 2. Service Contracts and Data Contracts
- from Professional WCF 4: Windows Communication Foundation with .NET 4
- Publisher: Wrox
- Released: June 2010
Share this highlighthttp://www.safaribooksonline.com/a/professional-wcf-4/20451/