Beispiel #1
0
        /// <summary>
        /// delete Collection
        /// </summary>
        /// <returns></returns>
        public void DropCollection(String DatabaseName, String TableName)
        {
            //数据库连接
            if (_connectionConfig.IsAutoCloseConnection == false)
            {
                if (_database.CheckStatus() == false)
                {
                    throw new Exception("databse connect not open");
                }
            }
            if (_connectionConfig.IsAutoCloseConnection == true)
            {
                _database.Open();
            }
            _database.DropCollection(DatabaseName, TableName);

            if (_connectionConfig.IsAutoCloseConnection == true)
            {
                _database.Close();
            }
        }