title: how to use group by in linq
body: <p>I have one news repeater that show two fields like <code>News_Text</code> and <code>News_Date</code>.</p>
  
  <p>Here I just want to display this data with group by <code>News_date</code>.</p>
  
  <p>like:</p>
  
  <pre><code>12/24/2013
  test
  test1
  test 2
  
  11/12/213
  blah..blah
  </code></pre>
  
  <p>here is my code:</p>
  
  <pre><code>private void BindNewsRepeater()
      {
          using (DataClassesDataContext db = new DataClassesDataContext())
          {
              var query = from n in db.News
                          orderby n.News_date descending
                          select new 
                      {
                           News_text = n.News_text,
                           News_date = n.News_date
                      };
  
              DataSet myDataSet = new DataSet();
              DataTable dt = new DataTable();
              dt.Columns.Add(new DataColumn("News_text", typeof(string)));
              dt.Columns.Add(new DataColumn("News_date", typeof(string)));
              foreach (var item in query)
              {
                  DataRow dr = dt.NewRow();
                  dr["News_text"] = item.News_text.ToString();
                  dr["News_date"] = item.News_date.ToString("dd/MM/yyyy");
                  dt.Rows.Add(dr);
              }
              myDataSet.Tables.Add(dt);
              rpt_news.DataSource = myDataSet;
              rpt_news.DataBind();
          }
      } 
  </code></pre>
  
  <p>and my repeater design code is:</p>
  
  <pre><code>&lt;asp:Repeater ID="rpt_news" runat="server" onitemdatabound="rpt_news_ItemDataBound"&gt;
       &lt;ItemTemplate&gt;&lt;asp:Label ID="lbl_news_date" runat="server"&gt;&lt;%#Eval("News_date")%&gt;&lt;/asp:Label&gt;&lt;br /&gt;
                                              &lt;asp:Label ID="lbl_news_text" runat="server"&gt;&lt;%#Eval("News_text")%&gt;&lt;/asp:Label&gt;
                                              &lt;/ItemTemplate&gt;
                                              &lt;SeparatorTemplate&gt;&lt;br/&gt;&lt;br/&gt;&lt;/SeparatorTemplate&gt;
       &lt;/asp:Repeater&gt;
  </code></pre>