Issues with WCF Datacontract serialization of circular references in Entity Framework

I use Entity Framework 4, having a round link among some objects, but I get a stackoverflow exception, this is the scenario when lazy loading is enabled ...

Then I made lazy loading turned on as false and turned on all related objects using the method Include(), but still getting the same error ... Help needed ...

+3
source share
2 answers

I came across this before - I solved this by adding the [IgnoreDataMember] attribute to the property that invokes the circular reference. This is usually a navigation property that refers to the parent.

+6
source

, - WCF

+1

All Articles