2

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.

Richard B
  • 1,581
  • 1
  • 15
  • 31

1 Answers1

0

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

Atanas Korchev
  • 30,562
  • 8
  • 59
  • 93
  • 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 Jun 26 '10 at 21:13