I have a LINQ query which checks to see if there are any tests done since the beginning of the year.
var MetersTestedCount = (from n in _mttDomainContext.MTTMeterTests
where n.TestDate > DateTime.Parse("1/1/2010")
select n.TestDate).Count();
This query however returns an empty set. I have a similar SQL query which pulls some records,
USE MeterTestTracking
Select * From MTTMeterTest
WHERE TestDate > '1/1/2010'
I have been to the previous posts. Even though similar, still no help:
How to compare just the date, not the timestamp using LINQ
and
What's the correct way to check dates in LINQ to return a dataset?