public void get() { redis.Set("foo", "bar"); var result = redis.Get("foo"); result.ShouldBe("bar"); }
public bool TryGetValue(string key, out byte[] value) { string res = _redis.Get(key); if (string.IsNullOrWhiteSpace(res)) { value = null; return(false); } else { value = System.Text.Encoding.UTF8.GetBytes(res); return(true); } }
public IActionResult Get_Redis(GetRedisRequest request) { var response = _sRedis.Get(request.key); return(Ok(response)); }