Serialization of EF objects; disabling proxy creation and lazy loading?

I am having problems with circular references when converting EF objects to json objects. I found a solution that works for me, but I would like to know what actually happens when I add

 context.ContextOptions.ProxyCreationEnabled = false;

and / or

context.ContextOptions.LazyLoadingEnabled = false;

The first seems enough to get a one-dimensional json object. Should I use both? And what are they really doing? Is there a smarter way around this? Thanks

+5
source share
1 answer

, . . . , , Serializable ( ) .

. , , . , , . , , . , , , EF.

: , . , Parent, Children, Parent ( )

+6

All Articles