title: Error: DbContext has been disposed
body: <pre><code>public JsonResult JTask(int id)
  {
      using (TestDb db = new TestDb())
      {
          var a = db.ToDos.Where(todo =&gt; todo.UserId == id);
          return Json(a, JsonRequestBehavior.AllowGet);
      }
  }
  </code></pre>
  
  <p>I have a problem with returning <code>JsonResult</code>
  When I run this code code I get the error </p>
  
  <blockquote>
    <p>"The operation cannot be completed because the <code>DbContext</code> has been
    disposed."</p>
  </blockquote>
  
  <p>I tried adding <code>.ToList()</code> at the end of the line 3, as was suggested, but then I got the error </p>
  
  <blockquote>
    <p>"A circular reference was detected while serializing an object of type
    System.Data.Entity.DynamicProxies."</p>
  </blockquote>