Neo
If you need the last entry in your section, using a date string for a row string is not a good approach, as the table store stores entities in ascending order based on the Row Key.
If at the current point you can change the value of your string, use DateTime.UtcNow.Ticks :
var invertedTimeKey = DateTime.MaxValue.Ticks - DateTime.UtcNow.Ticks
With this approach, when querying your table, you can make 1 record corresponding to the last.
If you cannot change the value of your row key, you will need to extract all the entries in this section, that is, load all of it into memory, and then arrange them using a timestamp to get the last. If you have a lot of entries, this is definitely not a good approach.
var lastResult = results.OrderByDescending(r => r.Timestamp).FirstOrDefault();
source share