我是 MongoDB 新手,我想问你们一个问题:
但是可以通过 mongo 查询语言从集合的属性中获取一个集合的名称吗?
我看到了 mongo 文档,但我没有找到任何东西。
在C#中可以这样使用
//create an instance of a MongoDB client
List<string> collectionNames= _dbClient
.GetDatabase("{your-db-name}")
.ListCollectionNames()
.ToListAsync();