开发者

WCF Translators

开发者 https://www.devze.com 2022-12-23 19:09 出处:网络
Is there开发者_开发问答 a better way in WCF werein we could avoid the translation betwee business entities and service entities, just to avoid the whole translator logic for complex entities.Any insig

Is there开发者_开发问答 a better way in WCF werein we could avoid the translation betwee business entities and service entities, just to avoid the whole translator logic for complex entities.Any insight on this topic is welcome


No, there's no "magic bullet" - but with tools like AutoMapper, you can lessen the burden and the pain of converting between business entities and data-transfer objects.

Check it out! Excellent tool, helps you tremendously, saves lots of silly left-right assignment code.....


Not REALLY - you want those decoupled because your business entities will be a "good entity model" while the service objects will be optimized for the use in the service (which may mean other property composition and inheritance decisions). An object/object mapper would help, but those are few and far between.

0

精彩评论

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

关注公众号