I have a query which returns a number of records.
For Example:
- Date is 26-Feb then 10 records are returned for this date.
- Date is 27-Feb then 15 records are returned for this date.
I used the following query:
var sData = vehicle.GsmDeviceLogs
.Where(gs => gs.Speed > zeroSpeed && !gs.DigitalInputLevel1)
.OrderBy(gs => gs.DateTimeOfLog)
.ToList();
Now, I just want to fetch the first record for each date. i.e.
- Date is 26-Feb - 1 Record.
- Date is 27-Feb - 1 Record.