Q:

How to serialize a Linq to Sql object graph without hiding the child's "Parent" member

Without hiding the Child object's reference to the Parent object, has anyone been able to use an XmlSerializer() object to move a Linq to SQL object to an XML document, or is the only appropriate way of handling this to create a custom serialization/deserialization class to handle moving the data to/from the xml document?
I don't like the idea of hiding the child object's reference to the parent object is why I'm asking.
Thx.

A:

Making the reference internal solves this problem for JSON serialization. You can try it to see if it would work for XML serialization too.

