title: Writing MySQL Records Using Entity Framework to Array
body: <p>I'm new to LINQ and Entity Framework for that matter. I'm using data from MySQL to write to an Excel worksheet.  Basic arrays are the fastest way to bulk write to worksheets.  So my question is, what would the fastest way be to populate an array?  Using LINQ?  My tables in MySQL are made up of composite keys so I would select records based on a few criteria.</p>
  
  <p>I got to the point where I <strong>size the array</strong>:</p>
  
  <pre><code>var rows = (from o in context.HoldingsEntitySet
              where o.AccountNumber == accountNumber 
              select o).Count();
  </code></pre>
  
  <p>Then I <strong>create the array</strong>:</p>
  
  <pre><code>var holdingsArray = new object[rows, 4];
  </code></pre>
  
  <p>Any help would be greatly appreciated because I'm a little stumped on how to do this!</p>
  
  <p>thanks,
  Justin</p>