且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

json.net;序列化实体框架对象(循环引用错误)

更新时间:2021-11-20 21:59:56

我的解决方案是简单地删除子实体上的父引用.

My solution was to simply remove the parent reference on my child entities.

所以在我的模型中,我选择了关系并将父引用更改为内部而不是公共.

So in my model, I selected the relationship and changed the Parent reference to be Internal rather than Public.

可能不是所有人的理想解决方案,但对我有用.

May not be an ideal solution for all, but worked for me.