Is it possible to reverse the DataContractSerialization unidirectional behavior of a Linq 2 SQL graphical object?

"By convention, the property on the parent side of the primary foreign key relationship is marked for serialization. The other side in the bidirectional relationship is not serialized."

Can I somehow change this so that the child side serializes the parent instead?

+1


source to share


1 answer


it is not possible. instead of using the DataContractSerializer, I decided to use the XmlSerializer and just control the "visibility" of the entities in relation to each other, making them both public and internally visible. this combined with XmlInclude instead of KnownType attributes allowed me to accomplish what I intended in the first place.



0


source







All Articles