title: LINQ to SQL . how to select all record using .take()
body: <pre><code>var result=(from refridgerators in context.A                                               
                                       group refridgerators by new { refridgerators.Id, refridgerators.Name } into gr
                                       select new DAO&lt;String&gt;
                                       {
                                           Key = gr.Key.Name,
                                           Count = gr.Count()
                                       }).OrderByDescending(k =&gt; k.Count).Take(numberOfRecords).ToList();
  </code></pre>
  
  <p>This is my linq to sql query this is working perfectly fine.</p>
  
  <p>this shows top 5 records (sorted by their count)  if i pass numberOfRecords =5.</p>
  
  <p>now my problem is i don`t want to modify query. so what should i do in above query to show all records. This is in relation with my requirement i want to use same query to show all refridgerators and Top 5 , top 10 refridgerators.</p>
  
  <p>I am not sure if it is possible using LINQ. but i guess there must be something related to this.</p>