Skip to content
Browse files

Enhanced the Readme

  • Loading branch information...
1 parent c891fc8 commit 01afad0dacf526a3c55972b4c92a29c67d421c63 @soitgoes committed Dec 8, 2010
Showing with 40 additions and 10 deletions.
  1. +0 −10 README
  2. +40 −0 README.md
View
10 README
@@ -1,10 +0,0 @@
-Love Seat is a simply architected CouchDB wrapper with the intent to abstract away just
-enough so that it's easy to use, but not enough so that you don't know what's going on.
-
-Tested with 1.0.1
-
-
-
-Roadmap:
-Setup a timer so that the client knows when to refetch the cookie instead of refetching it before every command
-Support Attachments
View
40 README.md
@@ -0,0 +1,40 @@
+Love Seat is a simply architected CouchDB wrapper with the intent to abstract away just
+enough so that it's easy to use, but not enough so that you don't know what's going on.
+
+Tested with 1.0.1
+
+LoveSeat Basics
+=================
+
+//Everything in LoveSeat starts with a CouchClient.
+
+var client = new CouchClient(); //assumes localhost:5984 with no credentials if left blank
+
+//From here you can get the database
+var db= client.GetDatabase("my_database");
+
+//Set the default design doc (not required and can be overriden
+db.SetDefaultDesignDoc("name_of_design_doc");
+
+//Get a Document By Id
+db.GetDocument("12345");
+
+//Get a view results and populate your Domain object
+var results = db.View<MyObject>("view_name");
+
+//...or with parameters
+var options = new ViewOptions{Limit=10};
+options.SetStartKey("abc");
+results = db.View<MyObject>("view_name", options);
+
+//loop through your strongly typed results
+
+foreach (var item in results.Items){
+/* do something */
+}
+
+//Get the results of a List
+var results = db.List("list_name")
+LoveSeat Supports Replication and User Management off of the CouchClient as well. Enjoy!
+
+

0 comments on commit 01afad0

Please sign in to comment.
Something went wrong with that request. Please try again.