title: Linq - Group By Id, Order By and Then select top 5 of each grouping
body: <p>Is there some way in linq group By Id, Order By descending and then select top 5 of each grouping? Right now I have some code shown below, but I used <code>.Take(5)</code> and it obviously selects the top 5 regardless of grouping.</p>
  
  <pre><code>Items = list.GroupBy(x =&gt; x.Id)
              .Select(x =&gt; x.OrderByDescending(y =&gt; y.Value))
              .Select(y =&gt; new Home.SubModels.Item {
                  Name= y.FirstOrDefault().Name,
                  Value = y.FirstOrDefault().Value,
                  Id = y.FirstOrDefault().Id
              })
  </code></pre>