I have a contract with the data in the project (Comp.DataContracts), which is not supposed to know about any other projects. I have Comp.ProjA, which refers to Comp.DataContracts and a derived class, which simply helps to fill in the data fields of the contract, but is not associated with datacontract. I want to tell the channel to make a service call using my derived type as a parameter, but it will be serialized as the base type.
Since I do not want draft service contracts or data to know about other projects, how do I do this? Can I explicitly datacontractserializer for serialization as the base instead of the derivative? I can always turn to the factory, to complete and return the correct type, but hoped not to do so.
How can I do this without KnownType in the base class? Ideas?
source share