I have a sorted set in Redis where I store the userid and last login timestamp.
Adding to sorted set (using below code) works like a charm using StackExchange.Redis for C# and I can see the values added in redis-cli.
IDatabase rdb = redis.GetDatabase();
rdb.SortedSetAdd("LOGINS", "userid:timestamp", 0.0, CommandFlags.None);
I now need to query Redis DB to get last login timestamp for a userid.
In redis-cli, I can run below query to get the last login timestamp for a userid:
zrevrangebylex LOGINS "[userid\xff" [userid LIMIT 0 1
However, I did not find a way to run this command in either StackExchange.Redis or ServiceStack.Redis to do lexicographic search in reverse order.
How to run above redis-cli query in C#?