Use CouchDB with .NET

前端 未结 14 2412
渐次进展
渐次进展 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: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. ;-)

提交回复
热议问题