title: Entity framework filtering data by time
body: <p>I am so sorry from the question, but I can not take a period from a <code>DateTime</code>. for exemple: If I have date <code>"10.10.2016 7:00", 10.10.2016 10:00"</code>, I need to take only the rows with the time between "6:00" and "8:00". Next is my code by return an error : <code>"can not use TimeOfDay ",</code>help me please</p>
  
  <pre><code>ds.TrafficJamMorning = (from row in orderQuery
                          where row.AcceptedTime.TimeOfDay &gt;= new TimeSpan(6, 30, 0) &amp;&amp;
                          row.AcceptedTime.TimeOfDay &lt;= new TimeSpan(9, 30, 0)
                          group row by row.AcceptedTime.Date
                          into grp
                          select new TrafficJamPeriodInfo
                          {
                               CurrentDateTime = grp.Key,
                               ReceptionCount = grp.Count(r =&gt; r.OrderOriginId == (int)OrderOrigin.Reception),
                               InternetCount = grp.Count(r =&gt; r.OrderOriginId == (int)OrderOrigin.Internet),
                               ExchangeSystemCount = grp.Count(r =&gt; r.OrderOriginId == (int)OrderOrigin.ExchangeSystem)
                          }).ToList();
  </code></pre>