Exemplo n.º 1
0
        private static void baseTest()
        {
            var redis = new RedisHelper();

            redis.Set<string>(RedisKeys.TestKey, DateTime.Now.ToString());

            var d = redis.Get<string>(RedisKeys.TestKey);

            redis.Remove(RedisKeys.TestKey);

            d = redis.Get<string>(RedisKeys.TestKey);
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            var redis = new RedisHelper();

            redis.Set<string>("aa", DateTime.Now.ToString());

            var d = redis.Get<string>("aa");

            redis.Remove("aa");

            d = redis.Get<string>("aa");
        }
Exemplo n.º 3
0
 public StudentDal(IConfiguration configuration, RedisHelper.RedisHelper redisHelper)
 {
     this.connectionString = configuration.GetSection("connectionString").Value;
     this.redisConf        = configuration.GetSection("redisConf").Value;
     this.RedisHelper      = redisHelper;
 }