Adding the NuGet package

Seeing as this chapter is all about MongoDB, we need to add this to our project. The best way to do this, is by adding the NuGet package. We can do this as follows:

  1. Right-click on your project and select Manage NuGet Packages... from the context menu, as shown in the following screenshot:
  1. On the NuGet screen, you will select the Browse tab and enter Mongodb.Driver as the search term.
  2. Select the MongoDB.Driver by MongoDB option.
  3. Click on the Install button to add the latest stable package to your project. This is depicted in the following screenshot:
  1. You can view the progress in the Output window of Visual Studio. ...

Get C# 7 and .NET Core 2.0 Blueprints now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.