I am looking for a very simple starter C# application for using StackExchange.Redis I have search over the web and found StackExchange.Redis
But this doesn't seems like a quick startup example.
I have setup redis on windows using StackExchange.Redis exe
Can anyone help me locate a simple C# application connecting with redis server and setting and getting some keys.
You can find C# examples in the readme file.
using StackExchange.Redis;
...
ConnectionMultiplexer redis = ConnectionMultiplexer.Connect("localhost");
// ^^^ store and re-use this!!!
IDatabase db = redis.GetDatabase();
string value = "abcdefg";
db.StringSet("mykey", value);
...
string value = db.StringGet("mykey");
Console.WriteLine(value); // writes: "abcdefg"