title: Linq to SQL execute query immediately
body: <p>I have Linq query and would like to execute it immediately and then manipulate data. Now in the code below the first (1) Linq query is executed when second (2) Linq query is executed. I would like to execute first(1) query first, how to do that? </p>
  
  <pre><code>// 1
  var statistic = DataAccess.Instance.Statistics
                      .Where(p =&gt; p.DateStamp &gt;= fromDate &amp;&amp; p.DateStamp &lt;= DateTime.UtcNow &amp;&amp; p.UserId == userId)
                      .Select(p =&gt; new {p.DateStamp.Year, p.DateStamp.Month, p.DateStamp.Day });
  
  
  values = new int[interval];
  labels = new string[interval];
  
  for (var i = 0; i &lt; labels.Length; i++)
  {
      // 2
      var recordsCount = statistic.Count(p =&gt; p.Year == dayStep.Year &amp;&amp; p.Month == dayStep.Month &amp;&amp; p.Day == dayStep.Day);
  }
  </code></pre>