JSON.NET Error Self referencing loop detected for type

后端 未结 25 2880
我在风中等你
我在风中等你 2020-11-22 02:16

I tried to serialize POCO class that was automatically generated from Entity Data Model .edmx and when I used

JsonConvert.SerializeObject 

25条回答
  •  渐次进展
    2020-11-22 02:30

    For not looping this worked for me-
    ReferenceLoopHandling = ReferenceLoopHandling.Ignore,

    I've solved it all here - Entity Framework children serialization with .Net Core 2 WebAPI https://gist.github.com/Kaidanov/f9ad0d79238494432f32b8407942c606

    Will appreciate any remarks. maybe someone can use it sometime.

提交回复
热议问题