title: LINQ : The query results cannot be enumerated more than once
body: <p>This is my code</p>
  
  <pre><code> searchDataContext db = new searchDataContext();
  
      var query = (from p in db.SearchFirst(city, area)
                  select new
                  {
                      ID = p.Id,
                      Address = p.address,
                      Level = p.agahilevel
  
                  });
      int count =query.Count();
  
      // records
      var q = query.Skip(Convert.ToInt32(start)).Take(Convert.ToInt32(width));
  
      if (q.Count() &gt; 0)
      {
          int index = 0;
          str += "[";
          foreach (var row in q)
          {
              if (index == 0)
  </code></pre>
  
  <p>I have an error in this code</p>
  
  <pre><code>The query results cannot be enumerated more than once.
  </code></pre>
  
  <p>please check that and answer me.</p>