title: Filling in missing days for rows
body: <p>Given a table with schema like this:</p>
  
  <pre><code>id1    id2    day    number
  </code></pre>
  
  <p>How can I turn this:</p>
  
  <pre><code>a    b    day1    2
  a    b    day5    4
  a    b    day9    8
  c    d    day2    1
  c    d    day3    2
  c    d    day5    4
  c    d    day8    3
  </code></pre>
  
  <p>Into this?:</p>
  
  <pre><code>a    b    day1    2
  a    b    day2    2
  a    b    day3    2
  a    b    day4    2
  a    b    day5    4
  a    b    day6    4
  a    b    day7    4
  a    b    day8    4
  a    b    day9    8
  c    d    day2    1
  c    d    day3    2
  c    d    day4    2
  c    d    day5    4
  c    d    day6    4
  c    d    day7    4
  c    d    day8    3
  </code></pre>
  
  <p>To clarify, for each group of id1 and id2, I need to fill in the missing rows
  with dates ranging from the minimum date for that grouping to the maximum
  date. Furthermore, the rows that get filled in must use the previous entry's
  number column for it's number column.</p>
  
  <p>I need this to run as fast as possible.</p>
  
  <p>Bonus points if you can do it in LINQ to SQL (assuming the class exists for
  the table).</p>
  
  <p>EDIT: The day column is actually an int that represents the day, but for the sake of argument, it could be a date.</p>
  
  <p>I've done the naive approach of iterating over each group and adding in the missing days, but it just seems terribly inefficient. I have to think that there's something faster or that someone has encountered this situation before.</p>