StackExchange.Redis
Chiavi e valori
Ricerca…
Impostazione dei valori
Tutti i valori in Redis vengono infine memorizzati come tipo RedisValue
:
//"myvalue" here is implicitly converted to a RedisValue type
//The RedisValue type is rarely seen in practice.
db.StringSet("key", "aValue");
Impostare e ottenere un int
db.StringSet("key", 11021);
int i = (int)db.StringGet("key");
O usando StackExchange.Redis.Extensions :
db.Add("key", 11021);
int i = db.Get<int>("key");
Modified text is an extract of the original Stack Overflow Documentation
Autorizzato sotto CC BY-SA 3.0
Non affiliato con Stack Overflow