Beispiel #1
0
 static BlogDB()
 {
     _server = "http://" +
         ConfigurationManager.AppSettings["couchdb_server"] + ":" +
         ConfigurationManager.AppSettings["couchdb_port"];
     _database = ConfigurationManager.AppSettings["post_db_name"];
     _db = new SharpCouch.DB();
     CheckDatabase();
 }
 public ContactsRepository()
 {
     object server;
     object database;
     object user;
     object password;
     var connectionString = new CouchDBConnectionString(System.Configuration.ConfigurationManager.ConnectionStrings["Contacts"].ConnectionString);
     connectionString.TryGetValue(CouchDBConnectionString.Server, out server);
     connectionString.TryGetValue(CouchDBConnectionString.Database, out database);
     connectionString.TryGetValue(CouchDBConnectionString.Username, out user);
     connectionString.TryGetValue(CouchDBConnectionString.Password, out password);
     SharpCouch.DB db = new SharpCouch.DB(server.ToString(), user.ToString(), password.ToString());
     contacts = Contacts.Connect(db, database.ToString());
 }
Beispiel #3
0
        public ContactsRepository()
        {
            object server;
            object database;
            object user;
            object password;
            var    connectionString = new CouchDBConnectionString(System.Configuration.ConfigurationManager.ConnectionStrings["Contacts"].ConnectionString);

            connectionString.TryGetValue(CouchDBConnectionString.Server, out server);
            connectionString.TryGetValue(CouchDBConnectionString.Database, out database);
            connectionString.TryGetValue(CouchDBConnectionString.Username, out user);
            connectionString.TryGetValue(CouchDBConnectionString.Password, out password);
            SharpCouch.DB db = new SharpCouch.DB(server.ToString(), user.ToString(), password.ToString());
            contacts = Contacts.Connect(db, database.ToString());
        }
Beispiel #4
0
 public static Sys Connect(SharpCouch.DB couch, string db)
 {
     return(new Sys(couch, db));
 }
Beispiel #5
0
 public Sys(SharpCouch.DB couch, string db)
 {
     _db    = db;
     _couch = couch;
 }
 public Sys(SharpCouch.DB couch, string db)
 {
     _db = db;
     _couch = couch;
 }
Beispiel #7
0
 public Contacts(SharpCouch.DB couch, string db)
 {
     _db    = db;
     _couch = couch;
 }
Beispiel #8
0
 public static Contacts Connect(SharpCouch.DB couch, string db)
 {
     return(new Contacts(couch, db));
 }
 public Contacts(SharpCouch.DB couch, string db)
 {
     _db = db;
     _couch = couch;
 }