views:

33

answers:

1

My c# application needs to persist its model classes to disk. Initially I tried to do xml serialization. However when I do breaking changes in my model (split one class to two) the saved xml will not deserialize (which is understood).

I thought about applying xslt to upgrade the xml but the xml generated is really complex.

Is it a good idea for me to do custom xml serialization to have a simpler format? Is it better to use a DB? Upgrading a DB is just running a script.

A: 

Implement ISerializable (binary) / IXmlSerializable (xml) and everything should work as expected (but you will have to do a bit more work).

jgauffin