You can put your definition ClassA(and other data contracts) in the class library and reference it from both services. Thus, both must use the same definition DataContracts.ClassA.
It is always useful to separate your service materials from individual projects:
- services (maintenance, work, data and, possibly, messaging contracts) into one class library (“Contracts”) - perhaps even several libraries
- class service implementation
- service host - if necessary (without using IIS) - into a separate assembly (console application)
This way, you can reuse some parts of your service contracts, and possibly implementations.
squeeze
source
share