MongoDb Official Driver Get Collection Names

   var m = new MongoClient("mongodb://1.2.3.4/NetWorth");
   var db = m.GetDatabase("NetWorth");
   var names = db.ListCollections().ToListAsync().Result.ToOtherTypeArray(b=> b.GetValue("name").AsString);

posted on 2024-07-15 17:34  norsd  阅读(2)  评论(0编辑  收藏  举报  来源

导航