Reference to determine MongoDB.Driver version (#10719)
* Reference to determine MongoDB.Driver version * Update to NuGetpull/10729/head
parent
546107f53b
commit
c8a951bf3e
|
@ -4,7 +4,7 @@ author: prkhandelwal
|
|||
description: This tutorial demonstrates how to build an ASP.NET Core web API using a MongoDB NoSQL database.
|
||||
ms.author: scaddie
|
||||
ms.custom: "mvc, seodec18"
|
||||
ms.date: 01/23/2019
|
||||
ms.date: 01/31/2019
|
||||
uid: tutorials/first-mongo-app
|
||||
---
|
||||
# Create a web API with ASP.NET Core and MongoDB
|
||||
|
@ -139,10 +139,10 @@ The database is ready. You can start creating the ASP.NET Core web API.
|
|||
1. Go to **File** > **New** > **Project**.
|
||||
1. Select **ASP.NET Core Web Application**, name the project *BooksApi*, and click **OK**.
|
||||
1. Select the **.NET Core** target framework and **ASP.NET Core 2.1**. Select the **API** project template, and click **OK**:
|
||||
1. In the **Package Manager Console** window, navigate to the project root. Run the following command to install the .NET driver for MongoDB:
|
||||
1. Visit the [NuGet Gallery: MongoDB.Driver](https://www.nuget.org/packages/MongoDB.Driver/) to determine the latest stable version of the .NET driver for MongoDB. In the **Package Manager Console** window, navigate to the project root. Run the following command to install the .NET driver for MongoDB:
|
||||
|
||||
```powershell
|
||||
Install-Package MongoDB.Driver -Version 2.7.2
|
||||
Install-Package MongoDB.Driver -Version {VERSION}
|
||||
```
|
||||
|
||||
# [Visual Studio Code](#tab/visual-studio-code)
|
||||
|
@ -157,10 +157,10 @@ The database is ready. You can start creating the ASP.NET Core web API.
|
|||
A new ASP.NET Core web API project targeting .NET Core is generated and opened in Visual Studio Code.
|
||||
|
||||
1. Click **Yes** when the *Required assets to build and debug are missing from 'BooksApi'. Add them?* notification appears.
|
||||
1. Open **Integrated Terminal** and navigate to the project root. Run the following command to install the .NET driver for MongoDB:
|
||||
1. Visit the [NuGet Gallery: MongoDB.Driver](https://www.nuget.org/packages/MongoDB.Driver/) to determine the latest stable version of the .NET driver for MongoDB. Open **Integrated Terminal** and navigate to the project root. Run the following command to install the .NET driver for MongoDB:
|
||||
|
||||
```console
|
||||
dotnet add BooksApi.csproj package MongoDB.Driver -v 2.7.2
|
||||
dotnet add BooksApi.csproj package MongoDB.Driver -v {VERSION}
|
||||
```
|
||||
|
||||
# [Visual Studio for Mac](#tab/visual-studio-mac)
|
||||
|
|
Loading…
Reference in New Issue