views:

12

answers:

1

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.

korchev
It does, the issue is that you don't get the child to parent object graph. For now, with the issue I had, it works... but for other jobs, I'll have to just use linq 2 sql as a data storage/retrieval mechanism, and use POCO objects to do the serialization.
Richard B