MongoDB creates assembly failures
1 answer
The correct way is to use a method , your code doesn't work because there is no mongodb object in your call . Try the following: db.createCollection()
testdb
testdb.createCollection(testcollection)
> use testdb
switched to db testdb
> db.createCollection("testcollection")
{ "ok" : 1 }
> db.getCollectionNames()
[ "system.indexes", "testcollection" ]
>
+4
source to share