开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜