Saving a collection of objects using BookSleeve

I am new to both Redis and BookSleeve. I am evaluating whether to use BookSleeve or ServiceStack.Redis.

ServiceStack seems a lot more persistent, but I like the pipelining idea provided by BookSleeve.

I have Redis and BookSleeve, and getting and setting strings is easy, but I'm struggling to find examples of setting and getting a collection of objects like my pocos.

public class MyType
{
....
}

IEnumerable<MyType> types = ....

How do I get and install them using BookSleeve?

Thank.

+5
source share
2 answers

When using ServiceStack.Redis, this is just a question:

var redisClient = new RedisClient();
redisClient.StoreAll(myTypes);

, , , API ServiceStack.Redis ( ) , , Redis.CreatePipeline() - . .

+1

BookSleeve API / (byte []), - , , , ..

, BookSleeve , , (XML, json, protobuf, ) . 2 3 ( MemoryStream).

+5

All Articles