Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using StackExchange.Redis;
- namespace RedisDemoApp
- {
- class Program
- {
- static void Main(string[] args)
- {
- ConnectionMultiplexer connectionMultiplexer = ConnectionMultiplexer
- .Connect("localhost:6379"); //redis is in docker. see with docker ps
- var redis = connectionMultiplexer.GetDatabase();
- redis.StringSet("key", "redis from docker");
- Console.WriteLine(redis.StringGet("name")); //key in redis
- Console.WriteLine(redis.StringGet("key"));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement