开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜