https://github.com/devrexlabs/models.redis
A redis clone
https://github.com/devrexlabs/models.redis
Last synced: 5 months ago
JSON representation
A redis clone
- Host: GitHub
- URL: https://github.com/devrexlabs/models.redis
- Owner: DevrexLabs
- License: mit
- Created: 2014-04-09T08:01:50.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2016-09-27T23:04:00.000Z (over 9 years ago)
- Last Synced: 2025-08-02T10:06:33.319Z (11 months ago)
- Language: C#
- Size: 28.3 KB
- Stars: 3
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Deprecated!
The RedisModel is now included in OrigoDb.Core
https://github.com/devrexlabs/origodb
Models.Redis
============
A redis clone for OrigoDB implemented in C#. Uses OrigoDB for persistence and transaction
gaurantees. The basic commands for keys, strings, lists, sets, hashes and sorted sets are implemented.
The implementation is a single class, RedisModel. Redis commands correspond to methods with
roughly the same name, signatures and behavior. See the docs http://redis.io/commands
## Example
```csharp
//create transparent persistence proxy using command logging (AOF)
var db = Db.For();
//call methods on the proxy
db.SAdd("fruit", "banana");
db.SAdd("fruit", "apple");
int actual = db.SCard("fruit");
//Set cardinality should be 2
Assert.AreEqual(2,actual);
```