How to serialize SubSonic objects with nullable properties (jamesewelch.wordpress.com)
submitted by
jamesewelch(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.
|
category: C#
|
Views: 77
tags:
.Net SubSonic C# ORM another
Everyones tags:
Your Tags: