Skip to content

Instantly share code, notes, and snippets.

@glaidler
Last active September 8, 2017 14:52
Show Gist options
  • Save glaidler/b908e766eae0a6ac0717c456d4d7481b to your computer and use it in GitHub Desktop.
Save glaidler/b908e766eae0a6ac0717c456d4d7481b to your computer and use it in GitHub Desktop.
RedisSerializationTest
using System;
using ServiceStack;
using ServiceStack.Text;
using ServiceStack.Redis;
using ServiceStack.DataAnnotations;
var redisManager = new RedisManagerPool("localhost:6379");
var redis = redisManager.GetClient();
var address = "{\"Address\":\"Bee Cottage, Lostwithiel\"}";
var key = "address";
redis.SetValue(key, address);
var returned = redis.Get<string>(key);
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="ServiceStack.Text" version="4.5.12" targetFramework="net45" />
<package id="ServiceStack.Interfaces" version="4.5.12" targetFramework="net45" />
<package id="ServiceStack.Common" version="4.5.12" targetFramework="net45" />
<package id="ServiceStack.Redis" version="4.5.12" targetFramework="net45" />
</packages>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment