I am trying to get all the collection names from MongoDb server using C# code using db.GetCollectionNames() method.
I have 12 collections in my database, but the above method returns an empty list. I have verified that I am referring to the correct database. What am I doing wrong? Or if there is an alternate way?