How can i get the last 100 records from the WADLogsTable Ordered by date ?
I tried to do it with this piece of code but it doesn’t work
var query = (from entity in tsc.CreateQuery<LogsObject>("WADLogsTable")
where entity.PartitionKey.CompareTo(startTime.ToUniversalTime().Ticks.ToString("D19")) >= 0
orderby entity.EventTickCount descending
select entity);
Where tsc is the TableServiceContext.
I can get the records but i’m interested in the recents logs.
Thanks,
Windows Azure table storage doesn’t support sorting, so entities always come back sorted by their PartitionKey+RowKey. But I suspect the log entries are already in reverse chronological order. Aren’t they?
[EDIT] Apparently they’re not. 🙂