title: Linq to SQL and using ToList, how many DB calls are made?
body: <p>I got a function like this</p>
  
  <pre><code>    public List&lt;Code&gt; GetCodes()
      {
          return _db.Codes.Select(p =&gt; p).ToList();
      }
  </code></pre>
  
  <p>I have 160,000 records in this table which contains 2 columns.</p>
  
  <p>Then I also loop through it as follows..</p>
  
  <pre><code>List&lt;Code&gt; CodeLastDigits = CodeDataProvider.GetCodes();
  </code></pre>
  
  <p>And then loop through it</p>
  
  <pre><code> foreach (var postCodeLastDigit in PostCodeLastDigits)
  </code></pre>
  
  <p>I am just trying to understand how many times a call is made to the database to retrieve those records, and want to make sure it only happens once.</p>