How to serialize SubSonic objects with nullable properties (jamesewelch.wordpress.com)

submitted by jamesewelchjamesewelch(2265) 1 year ago

Recently, I ran into the following error when trying to serialize some SubSonic generated classes. "Cannot serialize member ‘XXX’ of type System.Nullable`1[XXX]. XmlAttribute/XmlText cannot be used to encode complex types." The SubSonic autogenerated classes cannot serialize nullable types such as DateTime? and GUID?. This is really a .NET serialization problem and not directly related to SubSonic, since the SubSonic library just uses the native .NET code for serialization. I'll describe 3 (or 4) different ways of getting around this problem.

add a comment | category: | Views: 77

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:

Comments:

No comments so far

information Login or create an account to comment on this story