title: C# - Compare DateTime without Time on LINQ?
body: <pre><code>[Route("api/sensors/{id}/{date}/Measurements")]
  public IEnumerable&lt;Measurement&gt; GetMeasurements(int id, DateTime date)//date == "11:01:2016 00:00:00"
  {
      return _unitOfWork.MeasurementRepository.Get(orderBy: e =&gt; e.Where(ex =&gt; ex.SensorId == id).Where(a =&gt; a.Time == date).OrderBy(tx =&gt; tx.Time));
      //a.Time = 11:01:2016 00:00:00, ..., 11:01:2016 00:15:00, ...,11:01:2016 00:30:00, ...,11:01:2016 00:45:00, ...
  }
  </code></pre>
  
  <p>I have to return all measurement of the searched day (DateTime date), but I don't know how to compare the two DateTimes without the Time...</p>
  
  <p>If I use <code>a.Time.Date == date.Date</code>, this error appears :
  <a href="https://i.stack.imgur.com/tOUWs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tOUWs.png" alt="enter image description here"></a></p>