private void GetMongoDB(MongoClient client) { string[] DB_Array = MongoDBData.GetDatabaseNames(client).ToArray(); comboBox_DBList.Items.AddRange(DB_Array); comboBox_DBList.Text = DB_Array[0]; }
public void GetListCollectionsNames() //Get all collections names from all DBs { List <string> DB_collections; //Set database using var collCursor = MongoDBData.GetDatabase(client).ListCollectionNames(); DB_collections = collCursor.ToList(); string[] ColNames_Array = DB_collections.ToArray(); comboBox_Collections.Items.AddRange(ColNames_Array); comboBox_Collections.Text = ColNames_Array[0]; }
public SimpleBotUser(MongoDBData db) { _db = db; }