예제 #1
0
        public async Task BatchExecuteAsync()
        {
            await _redis.ExecuteBatchAsync(
                async() => await _redis.StringSetAsync("name", "colin"),
                async() => await _redis.SetAddAsync("guys", "robin")
                );

            Assert.Equal("colin", await _redis.StringGetAsync <string>("name"));
            Assert.Equal("robin", (await _redis.SetMembersAsync <string>("guys")).FirstOrDefault());

            await _redis.KeyDeleteAsync(new[] { "name", "guys" });
        }