LINQ 2 SQL with WCF and serializing EntityRef
I have a LINQ 2 SQL project and I'm trying to use it in WCF.
EntitySets serialize perfectly if I specify them with the LoadWi开发者_Python百科th<Type>
dataloadoptions. The problem is EntityRefs.
I have a customer with 1 address. But 1 address can have multiple customers.
How do I make sure that the Customer is passed over the line WITH the Address?
There is no [DataContract] attribute on the Address property of Customer. How do I solve this?
SerializationMode is already Unidirectional.
The solution was to disable the child <> parent relation.
精彩评论