using (var cursor = await client.ListDatabasesAsync()) { var databaseDocuments = await cursor.ToListAsync(); foreach (var databaseDocument in databaseDocuments) { Console.WriteLine(databaseDocument["name"]); } }
I'd like to list all the databases and then print their names. Can anyone supply an example of how I iterate through the result of the ListDatabasesAsync()? I'm not sure what to do with the resulting cursor.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at http://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/4dcd89a3-ecf6-4dde-a339-b8c15c6b7ee0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.