title: System.Data.Entity.DynamicProxies
body: <blockquote>
    <p>I tried this code in my controller Can any one show me the solution:</p>
  </blockquote>
  
  <pre><code>public JsonResult GetMembers(Member member)
  {
      //var list = repository.GetAll().Select(x =&gt; new ViewModel.MemberView
      //{
      //    Memberid = x.id,
      //    Name = x.name,
      //    EmailAddress = x.Email,
      //    Role = x.role.rolename,
      //    ReportingRoleId = Convert.ToInt32(x.reportingroleid)
      //});
  
      var list = repository.GetAll();
      return Json(list  , JsonRequestBehavior.AllowGet);
  }
  </code></pre>
  
  <p>javascript function </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      debugger;
      alert('first');
      google.load("visualization", "1", {packages:["orgchart"]});
      google.setOnLoadCallback(drawChart);
      function drawChart() {
          $.ajax({
              type: "POST",
              url: "/Organization/GetMembers",
              data :'{member:"+JSON.stringify(member)+"}',
              contentType: "application/json; charset=utf-8",
              dataType: "json",
              success: function (data) {
  
                  alert("Member Name"+data);
          //var data = new google.visualization.DataTable();
          //data.addColumn('string','name');
          //data.addColumn('string', 'role');
          //data.addColumn('string', 'ToolTip');
  
          //for (var i  = 0; i &lt; r.length; i++) {
          //    var memberId = r[i][0];
          //    var Name = r[i][1];
          //    var role= r[i][2];
          //    var reportingrole= r[i][3] != null ? r[i][3].toString() : '';
          //    data.addRows([[{
          //        v: employeeId,
          //        f: Name + '&lt;div&gt;(&lt;span&gt;' + role + '&lt;/span&gt;)&lt;/div&gt;&lt;img src = "/Pictures/' + memberId + '.jpg" /&gt;'
          //    }, reportingrole, role]]);
          //}
          //        var chart = new google.visualization.OrgChart($("#chart")[0]);
          //        chart.draw(data, { allowHtml: true });
              },
              failure: function (r) {
                  alert(r);
              },
              error: function (r) {
                  alert(r);
              }
          });
  }
  </code></pre>
  
  <p>It was Error</p>
  
  <blockquote>
    <p>A circular reference was detected while serializing an object of type 'System.Data.Entity.DynamicProxies.NewProjects_A3B55EADDAEF6C59245BBD2495E29ECFE10B583596DB24AADF23A4990342D104'.</p>
  </blockquote>