Adding methods to DataContract objects for WCF

后端 未结 4 1786
名媛妹妹
名媛妹妹 2020-12-06 08:20

Are DataContracts in WCF nothing more than DTOs? I was reading up about WCF and just had a couple of thoughts. It would be nice if some of the DataContract objects could hav

4条回答
  •  再見小時候
    2020-12-06 09:14

    Sharing your classes between client and server projects is the way to go. Do not forget to check in your service reference that it tries to reuse types in referenced assemblies. That way, the service reference will not generate proxy classes for the shared objects.

提交回复
热议问题