2

I was happy to find C# bindings for Redis with ServiceStackRedis. But when I tried to make a simple forms application and try to build the program it shows me error that RedisClient and ServiceStack.Redis etc are not found. But I already added those references to my project. Also while coding it properly shows the help text showing the constructor types RedisClient expects etc.. Is there any simple c# project example with redis available online? Any insight about how to use ServiceStackRedis is appreciated.

Regards, Lalith

3
  • can you add the exact exception message you got.. Commented Nov 25, 2010 at 6:25
  • It is the normal exception we get when an assembly reference is not found .. Commented Nov 29, 2010 at 20:39
  • The type or namespace name 'ServiceStack.Redis' could not be found (are you missing a using directive or an assembly reference? Commented Nov 29, 2010 at 20:40

1 Answer 1

6

I have a few examples currently available:

Here is the source code and the complete download (which includes Redis and RavenDB Window Servers) for the benchmarks comparing Cygwin Redis vs RavenDB as detaied in this blog post.

The Redis Admin UI includes a Web Services layer (JSON, XML, JSV, SOAP, etc) around each Redis operation which you can be download here.

Here is the self-contained unit tests for BlogPostExample.cs and BlogPostBestPractice.cs that show how you would build a simple blog using Redis.

You can also check out NHRedis (https://github.com/boxerab/NHRedis) as another open source project which makes use of the ServiceStack.Redis client.

Note: The Redis Client is also bundled with every version of ServiceStack.zip which you can also use.

Hope this helps!

-Demis

Sign up to request clarification or add additional context in comments.

2 Comments

Hi Demis, The NoSqlPerformance c# code you have given works fine. Since I use VisualStudio 2010 it upgraded the code to newer version. But when I create my own project and reference the ServiceStack dlls it doesn't work. So I shifted to Visual studio 2008 and it works fine now. Please let me know if there is anything else we need to take care if we want to run it on VS2010. -Lalith
That's because the entire Redis Client is also inside ServiceStack.dll, you can use one or the other but not both (as its a duplicate/ambiguous library). I would just use the client in ServiceStack.dll for less problems

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.