Iam using couch-db version 2.2.0
and I want to make crud operations on couchdb
database using .Net
so I installed Armchair.Core
Nuget Package version 0.11.2
and in order to add d a new document I, followed the code that is mentioned in not finished wiki yet https://bitbucket.org/dboneslabs/arm-chair/wiki/main-api/session-api.md
Database mydatabase = new Database("TestDb",newConnection("http://localhost:5984"));
using (var session = mydatabase.CreateSession())
{
var author = new Person("Jone");
session.Add(author);// NOTE: If no Id has been assigned before the instance is added to the Session, then ArmChair will assign it. After the object is committed to the database, the revision will then be set onto the instance
session.Commit();
}
but I still getting the error
Object reference not set to an instance of an object.
also mydatabase
variable mentioned in previous code has values null for Connection
and DataBase
Parameters even though i passed them in the constructor as it doesn't connect to couchdb database at all and never tries to create database TestDb
any help please ,are there any wrong calls in my code