title: LINQ To Entities doesn't recognize array index
body: <p>I have following function in my code</p>
  
  <pre><code>  public List&lt;string&gt; GetpathsById(List&lt;long&gt; id)
          {
  
              List&lt;string&gt; paths = new List&lt;string&gt;();
              for (int i = 0; i &lt; id.Count; i++)
              {
  
                  Presentation press = context.Presentations.Where(m =&gt; m.PresId == id[i]).FirstOrDefault();
                  paths.Add(press.FilePath);
              }
              return paths;
          }
  </code></pre>
  
  <p>But when I try this,  compiller get error like this.</p>
  
  <pre><code>LINQ to Entities does not recognize the method 'Int64 get_Item(Int32)' method, and this method cannot be translated into a store expression.
  </code></pre>
  
  <p>Then I try to do something like this and all works fine.</p>
  
  <pre><code>  public List&lt;string&gt; GetpathsById(List&lt;long&gt; id)
          {
               long x;
              List&lt;string&gt; paths = new List&lt;string&gt;();
              for (int i = 0; i &lt; id.Count; i++)
              {
                  x = id[i];
                  Presentation press = context.Presentations.Where(m =&gt; m.PresId == x).FirstOrDefault();
                  paths.Add(press.FilePath);
              }
              return paths;
          }
  </code></pre>
  
  <p>So I wonder, why? I can't get any answer for that behaviour in my mind. Can anyone explain this paradox?</p>