You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: aspnetcore/tutorials/first-mongo-app.md
+11-20Lines changed: 11 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ uid: tutorials/first-mongo-app
15
15
16
16
By [Pratik Khandelwal](https://twitter.com/K2Prk) and [Scott Addie](https://twitter.com/Scott_Addie)
17
17
18
-
:::moniker range=">= aspnetcore-8.0"
18
+
:::moniker range=">= aspnetcore-9.0"
19
19
20
20
This tutorial creates a web API that runs Create, Read, Update, and Delete (CRUD) operations on a [MongoDB](https://www.mongodb.com/what-is-mongodb) NoSQL database.
21
21
@@ -35,15 +35,11 @@ In this tutorial, you learn how to:
35
35
36
36
# [Visual Studio](#tab/visual-studio)
37
37
38
-
[!INCLUDE[](~/includes/net-prereqs-vs-8.0.md)]
38
+
[!INCLUDE[](~/includes/net-prereqs-vs-9.0.md)]
39
39
40
40
# [Visual Studio Code](#tab/visual-studio-code)
41
41
42
-
[!INCLUDE[](~/includes/net-prereqs-vsc-8.0.md)]
43
-
44
-
# [Visual Studio for Mac](#tab/visual-studio-mac)
45
-
46
-
[!INCLUDE[](~/includes/net-prereqs-mac-8.0.md)]
42
+
[!INCLUDE[](~/includes/net-prereqs-vsc-9.0.md)]
47
43
48
44
---
49
45
@@ -151,7 +147,11 @@ Use the previously installed MongoDB Shell in the following steps to create a da
151
147
1. Go to **File** > **New** > **Project**.
152
148
1. Select the **ASP.NET Core Web API** project type, and select **Next**.
153
149
1. Name the project *BookStoreApi*, and select **Next**.
154
-
1. Select the **.NET 8.0 (Long Term support)** framework and select **Create**.
150
+
1. In the **Additional information** dialog:
151
+
* Confirm the **Framework** is **.NET 9.0 (Standard Term Support)**.
152
+
* Confirm the checkbox for **Use controllers** is checked.
153
+
* Confirm the checkbox for **Enable OpenAPI support** is checked.
154
+
* Select **Create**.
155
155
1. In the **Package Manager Console** window, navigate to the project root. Run the following command to install the .NET driver for MongoDB:
156
156
157
157
```powershell
@@ -163,7 +163,7 @@ Use the previously installed MongoDB Shell in the following steps to create a da
163
163
1. Run the following commands in a command shell:
164
164
165
165
```dotnetcli
166
-
dotnet new webapi -o BookStoreApi
166
+
dotnet new webapi -o BookStoreApi --use-controllers
167
167
code BookStoreApi
168
168
```
169
169
@@ -176,17 +176,6 @@ Use the previously installed MongoDB Shell in the following steps to create a da
176
176
dotnet add package MongoDB.Driver
177
177
```
178
178
179
-
# [Visual Studio for Mac](#tab/visual-studio-mac)
180
-
181
-
1. Select **File** > **New Project...**.
182
-
1. Select **Web and Console** > **App** from the sidebar.
183
-
1. Select the **ASP.NET Core** > **API** C# project template, and select **Next**.
184
-
1. Select **.NET 8.0** from the **Target Framework** drop-down list, and select **Next**.
185
-
1. Enter *BookStoreApi* for the **Project Name**, and select **Create**.
186
-
1. In the **Solution** pad, right-click the project's **Dependencies** node and select **Manage NuGet Packages**.
187
-
1. Enter *MongoDB.Driver* in the search box, select the *MongoDB.Driver* package, and select **Add Package**.
188
-
1. Select the **Accept** button in the **License Acceptance** dialog.
189
-
190
179
---
191
180
192
181
## Add an entity model
@@ -352,6 +341,8 @@ To satisfy the preceding requirements, make the following changes:
0 commit comments