WCF DataContracts and underlying data structures

后端 未结 4 687
无人共我
无人共我 2021-02-02 18:04

I am wondering what makes sense in relation to what objects to expose through a WCF service - should I add WCF Serialization specifications to my business entities or should I i

4条回答
  •  攒了一身酷
    2021-02-02 18:17

    Something to also consider, I agree with the separation but it usually winds up leading to "Translators" or some such code to copy the data from the DTO to the Business Entity. This is where a library like AutoMapper (http://automapper.org/) comes in REAL handy and does away with the need to write the translation layer.

提交回复
热议问题