Skip to content

Connection strings

Andrey Bulygin edited this page May 21, 2013 · 2 revisions

Home

You can describe your connections with connection strings.

	  <connectionStrings>
    		<add name="Redis" connectionString="data source=10.1.2.210:6379;initial catalog=7"/>
 	  </connectionStrings>

Now use this connection string to initialize new instance of RedisClient

var cs = ConfigurationManager.ConnectionStrings["Redis"].ConnectionString;
var client = RedisClient.ConnectAsync(cs).Result;

The code above will make new connection to Redis server and perform a 'SELECT 7' command.

Currently passing password in connection string is not supported, but will be soon

Clone this wiki locally