WCF—Separating Contract from Implementation
Is there anyway one can separate the contract (data members) from the implementation (remaining methods used only by the serv开发者_开发百科ice internals) of a given class marked as DataContract
in two different assemblies? Doing this within the same assembly is easy with the partial
keyword, but I need to have them in separate assemblies.
[DataContract] is something you typically use on Interfaces rather than Classes. So put your interfaces in a separate assembly from your implementation classes and you'll get what you want.
精彩评论