This is a fork from [CodePlex] (http://stashy.codeplex.com/)
Stashy is a Micro-NoSql framework.
Stashy is a tiny interface, plus four reference implementations, for adding data storage and retrieval to all your .net types.
Drop a single stashy class into your application then you can save and load the lot. How to use Stashy
As a sample of using Stashy command-line key-value store called 'kv' is presented. See [/README-kv.md] (https://github.com/pnowosie/Stashy/blob/master/README-kv.md) for details. Or just grab one of the implementations and drop it into your own application. Then you can save, load, delete or query for your own types. No db needed. How to implement your own Stash
For any implementation of IStashy, you need to tell it what type of Keys you will use -- for example Int or Guid. Then you need to implement these five simple methods:
-
void Save(T1 t1, K id); Given an instance of some type, save it somewhere.
-
T1 Load(K id) where T1 : new(); Given a type and a key value, return the requested item.
-
IEnumerable LoadAll() where T1 : new(); Given a type, return all known instances of it. (Same as 'Select * from' some table)
-
void Delete(K id); Given a type and a key, delete it. (Delete from some table where Key = id.)
-
K GetNewId() where T1 : new(); Given a type, T1, return a new key. For example, If you're using sequential keys, you would have to return the next number in the series. If you're using Guids return a new guid. Implementation details. Last edited Jun 8, 2011 at 3:20 PM by secretGeek, version 3