开发者

System.DBNull with data contract name not expected in WCF [duplicate]

开发者 https://www.devze.com 2022-12-13 17:05 出处:网络
This question already has answers here: Closed 10 years ago. Possible Duplicate: Why isn’t my DbNull a singleton when I deserialise it using XmlSerialiser?
This question already has answers here: Closed 10 years ago.

Possible Duplicate:

Why isn’t my DbNull a singleton when I deserialise it using XmlSerialiser?

I have an object array that I am passing to a WCF call that has DBNull.Value as one of the values. WCF is apparently choking on it because it do开发者_Go百科esn't know how to serialize it.

Googling it only shows people who replaced the DBNull.Value with something else. Do I have to do that, or is there a way for me to have DBNull.Value on the client be serialized to the same thing on the server?


See this previous post.

Why isn't my DbNull a singleton when I deserialise it using XmlSerialiser?.

Also, as an aside, DBNull probably shouldn't be floating around in your service layer, although there is always a reason sometimes :)

0

精彩评论

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