Accessing the MongoDB database from an ASP.NET Core Web API application. The first thing we will do is to add the MongoDB driver NuGet package. This will allow us to access the MongoDB database via friendly APIs. Once this is done, we can proceed to start adding the code .