Beispiel #1
0
        /// <summary>
        /// delete GridFS
        /// 删除文件库
        /// </summary>
        /// <param name="GridFSName"></param>
        public void DeleteGridFS(String GridFSName = "")
        {
            //数据库连接
            if (_connectionConfig.IsAutoCloseConnection == false)
            {
                if (_database.CheckStatus() == false)
                {
                    throw new Exception("databse connect not open");
                }
            }
            if (_connectionConfig.IsAutoCloseConnection == true)
            {
                _database.Open();
            }
            _database.DeleteGridFS(_databasename, GridFSName);

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

            return;
        }