title: Entity framework with "Group By" and/or "Order by"
body: <p>Say we've got a project that allows user to download things. On the main page, I want to show the Most downloaded files ordered by the number of download! All that using EF.</p>
  
  <p>How can i do this !! I've tried many things with Group By (Its a nightmare when you've got a lot of informations in an object). And i still dunno how to do this...</p>
  
  <pre><code>var query = from details in m_context.TransactionDetails
                          where details.Chanson != null
                          group details by details.Items into AnItem
                          orderby AnItem.Count()
                          select new Item() {
                              IdItem = Chansons.Key.IdItem,
                              ItemState= Chansons.Key.ItemState,
                              [...This object got something like 20 including links to other objects ... ]
                          };
  </code></pre>
  
  <p>Anyone have an idea?</p>
  
  <p>Thanks :o)</p>
  
  <p>Oh and sorry for my english, I'm giving my best but im from Quebec (Usualy talk french).</p>