title: Entity to json error - A circular reference was detected while serializing an object of type
body: <p>Following error occurred when trying to convert entity object into JSON String. I'm using C# MVC4 with code first DB designing. It seams its because FKs and relationships between tables create this issue. What will be the workaround ?</p>
  
  <p><strong>A circular reference was detected while serializing an object of type System.Data.Entity.DynamicProxies.User</strong></p>
  
  <p>my code is</p>
  
  <pre><code>  User ma = db.user.First(x =&gt; x.u_id == id);
    return Json(ma, JsonRequestBehavior.AllowGet);
  </code></pre>