menu

Search This Blog






MongoDB from C# and .NET MongoDB Driver

 Part 3 :- | Using MongoDb With Asp.Net Core WebApi By Jaydip Garala


Watch Video




MongoDB In The Cloud With Atlas


 We will create a ASP.NET Core Web API application 

Add the MongoDB driver NuGet package. This will allow us to access the MongoDB database via friendly APIs

We first create a new folder called Models and add a new class Login.cs


We first create a new folder called Models and add a new class Login.cs








 MongoDB settings from the appsettings.config file



MongoDB settings from the appsettings.config file




 Now we will create LoginDatabaseSetting.cs

Now we will create LoginDatabaseSetting.cs




We will create a service layer. For this, create a new folder called Services and add a new class called LoginService.cs




We will create a service layer. For this, create a new folder called Services and add a new class called LoginService.cs


We add a new controller called LoginsController

We add a new controller called LoginsController





Configure the required services in the Startup.cs



Configure the required services in the Startup.cs


Slides