Asp.Net Core With MongoDB CRUD Operation
Why to use MongoDB as a backend for Asp.net Core?
MongoDB is a NoSQL document-oriented database that allows you to define JSON based documents which are schema independent. The schema can be mapped with Tables in a Relational Database. A schema in MongoDB is called as collection, and a record in this schema is called as document In open source modern web applications, the use of a NoSQL database is gaining popularity due to its non-relational behavior. In this project, ASP.NET Core performs CRUD Operations on a collection.
This is developed using Microsoft asp.net core version 3.1 and MongoDB version 1.0 This is very useful for learning asp.net core crud operation with MongoDB database. This comes with Full source code as well as database which you can use as the starting point of your first .net core project with Mongodb as database.
Prerequisite:
Visual Studio 2017 Or 2019 Community Edition (FREE)
MongoDB Campass version 2.5 or above
.NET Core 2.2.
MS IIS 7/8 or above
Unzip Solution
Open the project using Visual Studio
Change Connection string of database: Open appsettings.json file and change the following tag:
a. ConnectionStrings tag as below:
i. username: your username
ii. password: your password
iii. Database: your database
iv. culter: your clustername
Run website and login with default account:
a. Username: admin@demo.com
b. Password: 123456
Transfer the published project files into a folder in the server machine
Install IIS in your server machine
Paste published project In IIS wwwroot directory
Install ASP.NET Core hosting bundle for Windows (with correct version);
Create a new web site in the IIS and target the published files; and
Change the Enviroment Variable for created site , it's value same as Created Application
Run the app
If you have any query or problem you can write us any time on dotnetexpert24@gmail.com
We will get back to you quickly.