开发者

Use Non WCF Custom Class in WCF

开发者 https://www.devze.com 2023-04-12 04:38 出处:网络
I have a WCF serv开发者_如何学运维ice hosted in IIS. The intention is for clients to make a call and receive a custom class, which is not defined as WCF class and is defined in another project/dll. Ho

I have a WCF serv开发者_如何学运维ice hosted in IIS. The intention is for clients to make a call and receive a custom class, which is not defined as WCF class and is defined in another project/dll. How could I do this?


You need to decorate this custom class with the [DataContract] attribute and also all the public properties of it with [DataMember] attribute.

You also need both the client and the server to include that project/dll.

0

精彩评论

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

关注公众号