I tried to serialize POCO class that was automatically generated from Entity Data Model .edmx and when I used
JsonConvert.SerializeObject
We can add these two lines into DbContext class constructor to disable Self referencing loop, like
public TestContext() : base("name=TestContext") { this.Configuration.LazyLoadingEnabled = false; this.Configuration.ProxyCreationEnabled = false; }