Use CouchDB with .NET

前端 未结 14 2359
渐次进展
渐次进展 2020-12-12 13:46

Can .NET (managed code) read and write to CouchDB?

I would like to build a part of my project that does document management using CouchDB

相关标签:
14条回答
  • 2020-12-12 14:10

    Take a look at the SharpCouch utility class.

    It is a simple wrapper class for the CouchDB HTTP API.

    0 讨论(0)
  • 2020-12-12 14:13

    I have used JSON.NET in conjunction with the MS REST starter kit's http client class to integrate to CouchDB and it works really well.

    0 讨论(0)
  • 2020-12-12 14:14

    The options (ordered by latest update):

    • Skitsanos Webware Development Kit http://code.google.com/p/skitsanoswdk/source/browse/trunk/WDK10/WDK.API.CouchDb/ latest update sep. 2012
    • Relax-net/Hammock http://code.google.com/p/relax-net/ latest update nov. 2011
    • CouchDB.Net http://couchdbnet.codeplex.com/ latest update dec. 2010
    • Ottoman https://github.com/sinesignal/ottoman latest update dec. 2010
    • Divan https://github.com/foretagsplatsen/Divan latest update jul 2010
    • SharpCouch http://code.google.com/p/couchbrowse/source/browse/trunk/SharpCouch/SharpCouch.cs latest update aug. 2008
    0 讨论(0)
  • 2020-12-12 14:16

    Keep an eye on Ottoman an open-source project written in C#. It is still in heavy development, but I wanted to point it out as an option for projects in the planning stages. I will update this post as it gets closer to completion. You can view the source on github. Read the README to see examples and what is possible with the current version.

    • Unlike SharpCouch, which uses strings heavily, Ottoman uses generics for automatic serialization and desrialization for mapping an object from a JSON string and vice versa. All this without your objects needing to inherit off an interface or base class.
    • It uses Json.Net underneath to handle the JSON serialization and deserialization.
    • Maps the RESTFul error codes that CouchDB returns into Exceptions.
    • Planned Feature: Id generators for generating Id's for the objects being persisted
    • Planned Feature: Implicit Offline Optimistic Lock via Document Revisions, Ottoman will use an Identity Map to keep track for you and will throw an exception when a conflict occurs.
    • Planned Feature: It will be Mono compatible.
    • Planned Feature: This is down the road, but I do plan on having LINQ expressions for Map/Reduce functions which you express to CouchDB using JavaScript.

    It is a fairly new project, but very active. Of course, I'm a bit biased also. ;-)

    0 讨论(0)
  • 2020-12-12 14:16

    Check out Relax http://www.sharplearningcurve.com/wiki/Symbiote-Relax.ashx. Relax is a ".Net API abstraction of CouchDB's (excellent) RESTful API. It includes a repository-based interface for document interaction and a server controller for administrative type tasks."

    0 讨论(0)
  • 2020-12-12 14:19

    Yes.

    See here for instructions on installing CouchDB on windows.

    Here is a link to the getting started with C# wiki article. There is a link to a .Net wrapper in that article. It would be pretty easy to roll your own as well.

    0 讨论(0)
提交回复
热议问题