/// <summary> /// Use existing multiplexer for performance /// </summary> /// <param name="multiplexer"></param> /// <param name="db"></param> public RedisClient(IConnectionMultiplexer multiplexer, int db) { Multiplexer = multiplexer; Db = Multiplexer.GetDatabase(db); _provider = new RedisQueryProvider <TValue>(this); Context = new QueryableObject <TValue>(_provider); }
public RedisClient(string connectionString, int db) { Multiplexer = ConnectionMultiplexer.Connect(connectionString); Db = Multiplexer.GetDatabase(db); _provider = new RedisQueryProvider <TValue>(this); Context = new QueryableObject <TValue>(_provider); }