Bidirectional Serialization with Linq

Anyone know why only undirectional serialization is supported in the Linq designer?

Consider the following example:

Say we have a Customer who requested an Order containing Products. We set the Serialization Mode in the Linq designer to Unidirectional to enable serialization.

When looking at the code for the Order object, the DataMember attribute is added to all its internal properties such as ID,OrderNumber, etc. and also to the EntitySet of Products, but not to Customer.

One can get around this by manually adding the DataMember attribute to Customer, but this becomes quite cumbersome when there's loads of entities in the database.

Answers


A partial explanation and workaround is given here. Basically, the cyclic dependencies can occur if the serializer isn't sophisticated. A workaround for bidirectional serialization is available for VS 2008 is given for .NET 3.5 SP1.


Need Your Help

CLLocationManager didUpdateLocations not being called iOS 8 with plist entries

ios swift core-location

I'm having some issues with CLLocationManager. This code used to work on iOS 8.2 but since upgrading to 8.3 it doesn't work. Here is the code for setting up the location manager which is called on

Understanding exceptions in a constructor (by the conversion C-string to long example)

c++

I myself is a Java-developer and now I'm trying to understand how to do it in the most efficient way in C++. After reading that answer I decided to write the following: