I have a model that holds 2 related entities - Person and Addresses (multiple addresses per person).
When I load a person with his addresses and serialize them using DataContractJsonSerializer, the json string only holds the Person data and not the Addresses data.
From what I found, the reason is that the Addresses property doesn't have a DataMemberAttribute and doesn't have a set part for the property.
I tried to add the attribute and the set code to the generated code (manually adding code that takes the set value and add it to the EntityCollection), and managed to make the serializer work, which made me to believe that there is a bug in the way Entity frameworks generates the collection properties.
I hope it can be fixed soon,