Skip to content

nterranova-fsb/DreamSeat

 
 

Repository files navigation

DreamSeat

DreamSeat is a CouchDB client for the .NET plateform. It is based on LoveSeat from Martin Murphy.

DreamSeat is also base on :

Thanks to Mindtouch Dream, all the API calls can be executed asychronously or sychronously.

Tested compatibility

  • CouchDB 1.0 and 1.1
  • .NET Framework 4.0 or Mono 2.9 (compiled master branch from Nov 20 2010)

DreamSeat Main Features

  • Complete Synchronous/Asynchronous API
  • Manage Databases, Documents, Attachments, Views, Users, Replication, Change Notifications, ...

DreamSeat usage

Basics

Synchronous

// assumes localhost:5984 and Admin Party if constructor is left blank
var client = new CouchClient();
var db = client.GetDatabase("Northwind");

// get document by ID (return a object derived from [JObject](http://james.newtonking.com/projects/json/help/html/T_Newtonsoft_Json_Linq_JObject.htm))
var doc = GetDocument<JDocument>(string id);

// get document by ID (strongly typed POCO version)
var myObj = db.GetDocument<MyObject>("12345");

// You can also use the asynchronous method signatures asking to Wait()
var db2 = client.GetDatabase("Northwind", new Result<CouchDatabase>()).Wait();

Asynchronous

// assumes localhost:5984 and Admin Party if constructor is left blank
var client = new CouchClient();
client.GetDatabase("Northwind", new Result<CouchDatabase>()).WhenDone(
    a => DatabaseOpened(a),
    e => ProcessException(e)
    );
}

For more informations and examples of DreamSeat, have a look at the sample app code.

About

Asynchronous / Synchronous CouchDB API for .NET

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%