开发者

WCF—Separating Contract from Implementation

开发者 https://www.devze.com 2023-03-24 06:10 出处:网络
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 tw

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

精彩评论

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

关注公众号