public async Task LogSessionPerUser(string userId, long sessionId, long sessionScore) { var userKey = RedisKeysPrefixes.USER + ":" + userId; var sequence = _redisDB.CreateSequence(userKey); await sequence.ZAdd((sessionScore, sessionId.ToString())); }
public async void ZAdd() { await DB.Del("seq2"); var sequeue = DB.CreateSequence("seq2"); var count = await sequeue.ZAdd((1, Guid.NewGuid().ToString("N")), (2, Guid.NewGuid().ToString("N"))); Assert.Equal <long>(count, 2); Write(count); }