Skip to content

Instantly share code, notes, and snippets.

@Layoric
Last active August 25, 2016 03:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Layoric/780dd0deb728dc640e9507b22fb2721d to your computer and use it in GitHub Desktop.
Save Layoric/780dd0deb728dc640e9507b22fb2721d to your computer and use it in GitHub Desktop.
Using ServiceStack.Redis on .NET Core

Using ServiceStack.Redis on .NET Core

This guide shows how to create and execute .NET Core console application which uses ServiceStack.Redis.

Install .NET Core

At the first step you need to install Visual Studio 2015 update 3 and .NET Core 1.0.0 - VS 2015 Tooling Preview.

To get more details about Visual Studio 2015 update 3 and .NET Core installation you can visit .NET Core site.

Create .NET Core Application

In Visual Studio click File-> New-> Project and select .NET Core/Console Application (.NET Core) from VS templates.

File-> New-> Project

You will get following structure in Solution Explorer.

Right click on the project and select Manage NuGet Packages

In opened window click Browse tab, type ServiceStack.Redis.Core and hit Enter

Connecting to the Redis Server

Then open file Program.cs and write the code. Change the address localhost:6379 to the host:port where your Redis server is located.

Steps to connect to Redis.

  • Create a RedisManagerPool
  • Get client via manager.GetClient()

For more information on the using the ServiceStack.Redis API, try these live demos!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment