JSON.Net Self referencing loop detected

前端 未结 11 709
伪装坚强ぢ
伪装坚强ぢ 2020-11-28 04:18

I have a mssql database for my website within 4 tables.

When I use this:

public static string GetAllEventsForJSON()
{
    using (CyberDBDataContext d         


        
11条回答
  •  有刺的猬
    2020-11-28 04:53

    This may help you.

    public MyContext() : base("name=MyContext") 
    { 
        Database.SetInitializer(new MyContextDataInitializer()); 
        this.Configuration.LazyLoadingEnabled = false; 
        this.Configuration.ProxyCreationEnabled = false; 
    } 
    

    http://code.msdn.microsoft.com/Loop-Reference-handling-in-caaffaf7

提交回复
热议问题