You need something like Redis on Windows (here and here, for blog posts about that). You can use the repo stored on github. Once you have that you can build redis in Visual Studio and run it.
Service Stack also has a support page here, including a link to a project that runs Redis as a Windows Service.
Edit. And I've found the project and blog post I played with a month or so ago as well (which coincidentally is written by Jason from stackexchange).
LATE UPDATE Ok, so no sooner had I commented
do more than "download" and "execute installer to get robust service" like you do with Nuget packages
than I find this Redis Nuget that allows you to run Redis from the command line, released by MSOpenTech that you can use with the ServiceStack.Redis package
Edit and this is how you use it:
- Create a console application in Visual Studio
- Run "manage NuGet packages" in the project console menu on solution explorer
- Search for, and install "redis-64" and "ServiceStack.Redis" (you may want to do redis-64 by running install-package redis-64 from the Package Manager Console)
- Start redis from packages\Redis-64.\tools\redis-server.exe by cmd prompt or double click
- (If asked about windows firewall, just cancel to keep comms on the local machine)
run the following code:
public class Message { public long Id { get; set; } public string Payload { get; set; } } static void Main(string[] args) { List<string> messages = new List<string> { "Hi there", "Hello world", "Many name is", "Uh, my name is" }; var client = new RedisClient("localhost"); var msgClient = client.As<Message>(); for (int i = 0; i < messages.Count; i++) { Message newItem = new Message { Id = msgClient.GetNextSequence(), Payload = messages[i] }; msgClient.Store(newItem); } foreach (var item in msgClient.GetAll()) { Console.WriteLine("{0} {1}", item.Id, item.Payload); msgClient.DeleteById(item.Id); } Console.WriteLine("(All done, press enter to exit)"); Console.ReadLine(); }
Output:
1 Hi there 2 Hello world 3 Many name is 4 Uh, my name is (All done, press enter to exit)