title: Linq to SQL not querying memory
body: <p>I am using Linq for SQL and have always thought that I was querying the results of a Query in memory.  I have just looked at the database and it is showing many thousands of queries rather than 1 which is what I expected.</p>
  
  <p>My approach has been to run a query and then use linq to search within the resultset.</p>
  
  <pre><code>        IQueryable&lt;mapping&gt; fieldList = from mm in db.mappings
                          join mi in db.metaItems on mm.secondaryMetaItemId equals mi.metaItemId
                          join mo in db.metaObjects on mi.metaObjectId equals mo.metaObjectId
                          where mm.linkageId == 277
                          select mm;
  
          for (int i=0;i&lt;100;i++)
          {
              mapping thisVar = fieldList.FirstOrDefault(m =&gt; m.primaryItem == info.Name);             
          }
  </code></pre>
  
  <p>How can I stop Linq requerying everytime I access my resultset...</p>
  
  <p>Thanks for your help!</p>