开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜