Thursday 13 December 2018

Self referencing loop detected with type 'System.Data.Entity.DynamicProxies

Add this line of code in Global.asax file
in application start method


// Reference Loop Handling Ignore
            HttpConfiguration config = GlobalConfiguration.Configuration;

            config.Formatters.JsonFormatter
                        .SerializerSettings
                        .ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore;