I am using Entity Framework 4, having the circular reference among some of entities, but I am getting stackoverflow exception, this is the scenario when lazy loading is enabled...
Then I have made lazy loading enabled as false and include all the related entities using Include() method but still am getting the same error... Help needed....
I came across this before - I solved it by adding the [IgnoreDataMember] attribute to the property causing the circular reference. This was usually the navigation property that referenced the parent entity.
If you can't remove your cycles then something like WCF cyclic references should fix it
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With