Mayank Patel

Mayank Patel

  • NA
  • 4
  • 3.9k

how to create application in asp.net c# couchdb database

Oct 16 2013 7:12 AM
How to create application with Couchdb i fill problem regarding create application in asp.net using CouchDb database please say me about how to create application using CouchDb

i have some code problem occureing CouchServer assembly reference 

const string host = "localhost";

        const int port = 5984;

        var server = new CouchServer(host, port);

        var db = server.GetDatabase("myfirstdatabase");

        var document = new SomeRandomAggregateRoot
           {
               This = "Is cool!",
               Subclass = new SomeRandomClass { IsAwesome = "hell yeah!" }
           };

        using (var couchRepo = new CouchRepository<SomeRandomAggregateRoot>(db))
        {

            var id = couchRepo.Save(document);

            var returnedCouchDoc = couchRepo.Retrieve(id);

            ViewData["Message"] = returnedCouchDoc._id;

        }