title: The operation cannot be completed because the DbContext has been disposed error
body: <p>I'm new to EF and I'm trying to use an extension method which converts from my Database type <code>User</code> to my info class <code>UserInfo</code>.
  <br/>I'm using database first if that makes a difference?</p>
  
  <p>My code below gives the error </p>
  
  <blockquote>
    <p>The operation cannot be completed because the DbContext has been disposed.</p>
  </blockquote>
  
  <pre><code>try
  {
      IQueryable&lt;User&gt; users;
      using (var dataContext = new dataContext())
      {
          users = dataContext.Users
                    .Where(x =&gt; x.AccountID == accountId &amp;&amp; x.IsAdmin == false);
          if(users.Any() == false)
          {
              return null;
          }
      }
      return users.Select(x =&gt; x.ToInfo()).ToList(); // this line is the problem
  }
  catch (Exception ex)
  {
      //...
  }
  </code></pre>
  
  <p>I can see why it would do it, but I also don't understand why the result of the where statement isn't being saved into the <code>users</code> object?</p>
  
  <p>So I guess my main question is why doesn't it work and secondly what's the right way of using extension methods and EF?</p>