title: Row_number over (Partition by xxx) in Linq?
body: <p>I have a <code>DataTable</code> which has a structure and data:</p>
  <pre><code>id |   inst   |   name
  ------------------------
   1 |  guitar  |  john
   2 |  guitar  |  george
   3 |  guitar  |  paul
   4 |  drums   |  ringo
   5 |  drums   |  pete
  </code></pre>
  <p>I can retrieve the records via:</p>
  <pre><code>IEnumerable &lt;Beatle&gt;...
  
  class Beatle
  {
    int id;
    string inst;
    string name;
  }
  </code></pre>
  <p>I'd like to get the internal order of those who play the different instruments.  In MSSQL I'd use</p>
  <pre><code>SELECT 
      *
      ,Row_Number() OVER (PARTITION BY inst ORDER BY id) AS rn
  FROM Beatles
  </code></pre>
  <p>This query returns</p>
  <pre><code>id |   inst   |   name  | rn
  -----------------------------
   1 |  guitar  |  john   | 1
   2 |  guitar  |  george | 2
   3 |  guitar  |  paul   | 3
   4 |  drums   |  ringo  | 1
   5 |  drums   |  pete   | 2
  </code></pre>
  <p><strong>Question:</strong><br />
  How can I do that in <em>Linq</em>?</p>