Why is the Web Api returning empty json results with “$ref=”?

前端 未结 2 1129
余生分开走
余生分开走 2020-12-06 13:49

I disabled lazy loading and proxy creation in EF5 before returning any results in the Web Api. Everything worked fine. However, when i start to Include() other

2条回答
  •  借酒劲吻你
    2020-12-06 14:04

    You can also disable lazyloading if you have to serialize your EF entities. it's worked for me.

    Go to the context.cs file under your edmx file and add this Line in the constructor.

    this.Configuration.LazyLoadingEnabled = false;

提交回复
热议问题