C # libraries for CouchDB?

I have not seen a question asked / answered for more than a year, and I am sure that there have been many changes during this time.

If you use CouchDB in a .Net / C # environment (during production), I would like to know which library you are using and what your impressions were.

I found that there are at least four libraries: a hammock, relaxation, sofa and SharpCouch. However, I have very little attitude to textbooks, blog posts, recommendations, documentation, etc., When I call them by the names + "CouchDB". It also seems that none of them has a binary version yet (all “pull the source and build”).

Are these libraries even newer / immature? Are they so simple that there is no real need for documentation? There are so few .Net developers using CouchDB that no one talks about it in this space?

Thank you for understanding.

+3
source share
2 answers

All CouchDB features are displayed via the HTTP API, so you really need a good HTTP library and some error code handling. I guess the reason you won't find many CouchDB libraries: the protocol / API is so simple that you can get started right away.

+3
source

Maybe something like!

class Program
{
    static void Main(string[] args)
    {
        var sDireccion = @"http://localhost:5984/base_principal/_all_docs";
        var client = new WebClient { Credentials = new NetworkCredential("zzz", "zzz + zzz"), Encoding = Encoding.UTF8 };
        var sRespuesta = client.DownloadString(sDireccion);
        cClaseBase cBase = new cClaseBase();
        cBase = JsonConvert.DeserializeObject<cClaseBase>(sRespuesta);
        foreach (Row str in cBase.rows)
        {
            sDireccion = @"http://localhost:5984/base_principal/"+str.id;
            sRespuesta = client.DownloadString(sDireccion);
            cClaseDetalle cd = new cClaseDetalle();
            cd = JsonConvert.DeserializeObject<cClaseDetalle>(sRespuesta);
        }
    }
0
source

Source: https://habr.com/ru/post/1761810/


All Articles