Sample CRUD Operation ASP.Net MVC with MongoDB
Welcome to the ASP.NetMVCMongoDBSample.
(Using 1.8.3 MongoDB driver for C#. In latest versions some methods are obsolete.)
Prerequisites:
-
MongoDB server running on your system.
-
Visual Studio 2013 or later.
Install MongoDB:
Step1: Download it from MongoDB official site.
Step2: Installation is very easy. After accepting agreement&terms choose _complete _installation option.
Step3: Create folder location C:\data\db as shown in picture. This folder will be used by MongoDB server to store data.
Step4: Copy location of installation directory. We need it to start the server. By default it should be "C:\Program Files\MongoDB\Server\3.2\bin"
Open command prompt go to the installation directory copied previously then type: mongod. It will start the MongoDB server as you can see in picture below.
Run Solution:
Open solution in visual studio and run it.
Here is the output. Enjoy :)