Ejemplo n.º 1
0
        public void ChangeDatabase()
        {
            Conn.ChangeDatabase("template1");
            var command = new NpgsqlCommand("select current_database()", Conn);
            var result  = (String)command.ExecuteScalar();

            Assert.AreEqual("template1", result);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 修改当前连接的数据库
 /// 不要用.会出问题.
 /// </summary>
 /// <param name="databaseName"></param>
 public void ChangeDatabase(string databaseName)
 {
     Conn.ChangeDatabase(databaseName);
 }