I am trying to run MongoDB with my Visual Studio ASP.NET MVC 5 project. My question is: how do I tell Visual Studio the name of the database that I want to use?
So far, I have the following in the <appSettings> of Web.config:
<add key="DbName" value="db1" />
Then, I run the mongod command to start MongoDB, and then run the Visual Studio debugger. It shows me a page I have written which allows me to register a user, which should create some entries in the database. However, when I go to the MongoDB shell by running mongo, and type in show dbs, I get the following:
ASPNETDB 0.078GB
admin (empty)
local 0.078GB
And there is no sign of the db1 database I specified before.
Please can someone explain where how I specify the name of the database I want to use?