WCF: MessageContract, DataContract … Confused?

前端 未结 2 1890
Happy的楠姐
Happy的楠姐 2020-12-23 17:47

I\'m writing my first WCF service. I decided to write the service just as a DLL to begin with and then aspect the WCF stuff on afterwards which is where I am now.

I

2条回答
  •  礼貌的吻别
    2020-12-23 18:02

    Though not a direct answer to your question, it is worth to take a note of the following from MSDN -Using Message Contracts

    Each individual message header and message body part is serialized (turned into XML) using the chosen serialization engine for the service contract where the message is used. The default serialization engine, the XmlFormatter, can handle any type that has a data contract, either explicitly (by having the System. Runtime. Serialization. DataContractAttribute) or implicitly (by being a primitive type, having the System.SerializableAttribute, and so on).

    enter image description here

提交回复
热议问题