title: Is indexing on an IQueryable possible without converting to List?
body: <p>I have a Razor Pages web application where my onget method has a LINQ query that finds a collection of no more than 5 records (my source is very large SQL view I've created):</p>
  
  <pre class="lang-cs prettyprint-override"><code>IQueryable&lt;int&gt; ShipmentQtys = _MyContext
      .MaxShipmentEntries
      .Where(m =&gt; m.PartNo == currentPart)
      .Select(m =&gt; m.ShipQty);
  </code></pre>
  
  <p>It's speedy, but the problem is that I need to index off of the results. I know that I need to use .ToList() instead, but this significantly slows down my load time by a long shot, I'm assuming because my view is huge, so I'm stuck on how to get around the problem.</p>
  
  <p>I need to index it in order to display each record (up to 5) in 5 fields that I have defined in my application. One post suggested using .ElementAt, but that is not supported in LINQ.</p>
  
  <pre class="lang-cs prettyprint-override"><code>ShipQtyField1 = ShipmentQtys[0];
  ShipQtyField2 = ShipmentQtys[1];
  //etc.
  </code></pre>
  
  <p>Is there another way I can index an IQueryable(or an IEnumerable), or an alternative to indexing at all in my circumstance?</p>