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
+6-7Lines changed: 6 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,10 +50,10 @@ Enable MongoDB and MongoDB Shell access from anywhere on the development machine
50
50
51
51
1. Download and Install MongoDB Shell:
52
52
* macOS/Linux: Choose a directory to extract the MongoDB Shell to. Add the resulting path for `mongosh` to the `PATH` environment variable.
53
-
* Windows: MongoDB Shell (mongosh.exe) is installed at *C:\Users\<user>\AppData\Local\Programs\mongosh*. Add the resulting path for `mongosh.exe` to the `PATH` environment variable.
53
+
* Windows: MongoDB Shell (mongosh.exe) is installed at *C:\\Users\\\<user>\\AppData\\Local\\Programs\\mongosh*. Add the resulting path for `mongosh.exe` to the `PATH` environment variable.
54
54
1. Download and Install MongoDB:
55
55
* macOS/Linux: Verify the directory that MongoDB was installed at, usually in */usr/local/mongodb*. Add the resulting path for `mongodb` to the `PATH` environment variable.
56
-
* Windows: MongoDB is installed at *C:\\Program Files\MongoDB* by default. Add *C:\\Program Files\\MongoDB\\Server\\\<version_number>\\bin* to the `PATH` environment variable.
56
+
* Windows: MongoDB is installed at *C:\\Program Files\\MongoDB* by default. Add *C:\\Program Files\\MongoDB\\Server\\\<version_number>\\bin* to the `PATH` environment variable.
57
57
1. Choose a Data Storage Directory: Select a directory on your development machine for storing data. Create the directory if it doesn't exist. The MongoDB Shell doesn't create new directories:
58
58
* macOS/Linux: For example, `/usr/local/var/mongodb`.
59
59
* Windows: For example, `C:\\BooksData`.
@@ -65,14 +65,13 @@ Enable MongoDB and MongoDB Shell access from anywhere on the development machine
65
65
66
66
Use the previously installed MongoDB Shell in the following steps to create a database, make collections, and store documents. For more information on MongoDB Shell commands, see [`mongosh`](https://docs.mongodb.com/mongodb-shell/run-commands/).
67
67
68
-
1. Open a MongoDB command shell instance by launching `mongosh.exe`.
69
-
1. In the command shell, connect to the default test database by running the following command:
68
+
1. Open a MongoDB command shell instance by launching `mongosh.exe`, or by running the following command in the command shell:
70
69
71
70
```console
72
71
mongosh
73
72
```
74
73
75
-
1.Run the following command in the command shell:
74
+
1.In the command shell connect to the default test database by running:
76
75
77
76
```console
78
77
use BookStore
@@ -268,7 +267,7 @@ The preceding web API controller:
268
267
269
268
1. Build and run the app.
270
269
271
-
1. Navigate to `https://localhost:<port>/api/books`, where `<port>` is the automatically assigned port number for the app, to test the controller's parameterless `Get` action method, select **Try it out** > **Execute**. A JSON response similar to the following is displayed:
270
+
1. Navigate to `https://localhost:<port>/api/books`, where `<port>` is the automatically assigned port number for the app, to test the controller's parameterless `Get` action method. A JSON response similar to the following is displayed:
272
271
273
272
```json
274
273
[
@@ -334,7 +333,7 @@ To satisfy the preceding requirements, make the following changes:
334
333
335
334
## Additional resources
336
335
337
-
*[View or download sample code](https://github.com/dotnet/AspNetCore.Docs/tree/main/aspnetcore/tutorials/first-mongo-app/samples) ([how to download](xref:index#how-to-download-a-sample))
336
+
*[View or download sample code](https://github.com/dotnet/AspNetCore.Docs/tree/main/aspnetcore/tutorials/first-mongo-app/samples/8.x/BookStoreApi) ([how to download](xref:index#how-to-download-a-sample))
338
337
*<xref:web-api/index>
339
338
*<xref:web-api/action-return-types>
340
339
*[Create a web API with ASP.NET Core](/training/modules/build-web-api-aspnet-core/)
Copy file name to clipboardExpand all lines: aspnetcore/tutorials/first-mongo-app/includes/first-mongo-app3-5.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -354,6 +354,7 @@ To satisfy the preceding requirements, make the following changes:
354
354
355
355
For more information on building ASP.NET Core web APIs, see the following resources:
356
356
357
+
*[View or download sample code](https://github.com/dotnet/AspNetCore.Docs/tree/main/aspnetcore/tutorials/first-mongo-app/samples/3.x/SampleApp) ([how to download](xref:index#how-to-download-a-sample))
357
358
*[YouTube version of this article](https://www.youtube.com/watch?v=7uJt_sOenyo&feature=youtu.be)
Copy file name to clipboardExpand all lines: aspnetcore/tutorials/first-mongo-app/includes/first-mongo-app6.md
+3-4Lines changed: 3 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,14 +45,13 @@ Enable MongoDB and Mongo DB Shell access from anywhere on the development machin
45
45
46
46
Use the previously installed MongoDB Shell in the following steps to create a database, make collections, and store documents. For more information on MongoDB Shell commands, see [`mongosh`](https://docs.mongodb.com/mongodb-shell/run-commands/).
47
47
48
-
1. Open a MongoDB command shell instance by launching `mongosh.exe`.
49
-
1. In the command shell connect to the default test database by running the following command:
48
+
1. Open a MongoDB command shell instance by launching `mongosh.exe`, or by running the following command in the command shell:
50
49
51
50
```console
52
51
mongosh
53
52
```
54
53
55
-
1.Run the following command in the command shell:
54
+
1.In the command shell connect to the default test database by running:
56
55
57
56
```console
58
57
use BookStore
@@ -320,7 +319,7 @@ To satisfy the preceding requirements, make the following changes:
320
319
321
320
## Additional resources
322
321
323
-
*[View or download sample code](https://github.com/dotnet/AspNetCore.Docs/tree/main/aspnetcore/tutorials/first-mongo-app/samples) ([how to download](xref:index#how-to-download-a-sample))
322
+
*[View or download sample code](https://github.com/dotnet/AspNetCore.Docs/tree/main/aspnetcore/tutorials/first-mongo-app/samples/6.x/BookStoreApi) ([how to download](xref:index#how-to-download-a-sample))
324
323
*<xref:web-api/index>
325
324
*<xref:web-api/action-return-types>
326
325
*[Create a web API with ASP.NET Core](/training/modules/build-web-api-aspnet-core/)
Copy file name to clipboardExpand all lines: aspnetcore/tutorials/first-mongo-app/includes/first-mongo-app7.md
+3-4Lines changed: 3 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,14 +45,13 @@ Enable MongoDB and Mongo DB Shell access from anywhere on the development machin
45
45
46
46
Use the previously installed MongoDB Shell in the following steps to create a database, make collections, and store documents. For more information on MongoDB Shell commands, see [`mongosh`](https://docs.mongodb.com/mongodb-shell/run-commands/).
47
47
48
-
1. Open a MongoDB command shell instance by launching `mongosh.exe`.
49
-
1. In the command shell connect to the default test database by running the following command:
48
+
1. Open a MongoDB command shell instance by launching `mongosh.exe`, or by running the following command in the command shell:
50
49
51
50
```console
52
51
mongosh
53
52
```
54
53
55
-
1.Run the following command in the command shell:
54
+
1.In the command shell connect to the default test database by running:
56
55
57
56
```console
58
57
use BookStore
@@ -321,7 +320,7 @@ To satisfy the preceding requirements, make the following changes:
321
320
322
321
## Additional resources
323
322
324
-
*[View or download sample code](https://github.com/dotnet/AspNetCore.Docs/tree/main/aspnetcore/tutorials/first-mongo-app/samples) ([how to download](xref:index#how-to-download-a-sample))
323
+
*[View or download sample code](https://github.com/dotnet/AspNetCore.Docs/tree/main/aspnetcore/tutorials/first-mongo-app/samples/7.x/BookStoreApi) ([how to download](xref:index#how-to-download-a-sample))
325
324
*<xref:web-api/index>
326
325
*<xref:web-api/action-return-types>
327
326
*[Create a web API with ASP.NET Core](/training/modules/build-web-api-aspnet-core/)
Copy file name to clipboardExpand all lines: aspnetcore/tutorials/first-mongo-app/includes/first-mongo-app8.md
+6-8Lines changed: 6 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,10 +37,10 @@ Enable MongoDB and MongoDB Shell access from anywhere on the development machine
37
37
38
38
1. Download and Install MongoDB Shell:
39
39
* macOS/Linux: Choose a directory to extract the MongoDB Shell to. Add the resulting path for `mongosh` to the `PATH` environment variable.
40
-
* Windows: MongoDB Shell (mongosh.exe) is installed at *C:\Users\<user>\AppData\Local\Programs\mongosh*. Add the resulting path for `mongosh.exe` to the `PATH` environment variable.
40
+
* Windows: MongoDB Shell (mongosh.exe) is installed at *C:\\Users\\\<user>\\AppData\\Local\\Programs\\mongosh*. Add the resulting path for `mongosh.exe` to the `PATH` environment variable.
41
41
1. Download and Install MongoDB:
42
42
* macOS/Linux: Verify the directory that MongoDB was installed at, usually in */usr/local/mongodb*. Add the resulting path for `mongodb` to the `PATH` environment variable.
43
-
* Windows: MongoDB is installed at *C:\\Program Files\MongoDB* by default. Add *C:\\Program Files\\MongoDB\\Server\\\<version_number>\\bin* to the `PATH` environment variable.
43
+
* Windows: MongoDB is installed at *C:\\Program Files\\MongoDB* by default. Add *C:\\Program Files\\MongoDB\\Server\\\<version_number>\\bin* to the `PATH` environment variable.
44
44
1. Choose a Data Storage Directory: Select a directory on your development machine for storing data. Create the directory if it doesn't exist. The MongoDB Shell doesn't create new directories:
45
45
* macOS/Linux: For example, `/usr/local/var/mongodb`.
46
46
* Windows: For example, `C:\\BooksData`.
@@ -52,15 +52,13 @@ Enable MongoDB and MongoDB Shell access from anywhere on the development machine
52
52
53
53
Use the previously installed MongoDB Shell in the following steps to create a database, make collections, and store documents. For more information on MongoDB Shell commands, see [`mongosh`](https://docs.mongodb.com/mongodb-shell/run-commands/).
54
54
55
-
1. Open a MongoDB command shell instance by launching `mongosh.exe`.
56
-
1. In the command shell, connect to the default test database by running the following command:
55
+
1. Open a MongoDB command shell instance by launching `mongosh.exe`, or by running the following command in the command shell:
57
56
58
57
```console
59
58
mongosh
60
59
```
61
60
62
-
1. Run the following command in the command shell:
63
-
61
+
1. In the command shell connect to the default test database by running:
64
62
```console
65
63
use BookStore
66
64
```
@@ -262,7 +260,7 @@ The preceding web API controller:
262
260
263
261
1. Build and run the app.
264
262
265
-
1. Navigate to `https://localhost:<port>/api/books`, where `<port>` is the automatically assigned port number for the app, to test the controller's parameterless `Get` action method, select **Try it out** > **Execute**. A JSON response similar to the following is displayed:
263
+
1. Navigate to `https://localhost:<port>/api/books`, where `<port>` is the automatically assigned port number for the app, to test the controller's parameterless `Get` action method. A JSON response similar to the following is displayed:
266
264
267
265
```json
268
266
[
@@ -328,7 +326,7 @@ To satisfy the preceding requirements, make the following changes:
328
326
329
327
## Additional resources
330
328
331
-
*[View or download sample code](https://github.com/dotnet/AspNetCore.Docs/tree/main/aspnetcore/tutorials/first-mongo-app/samples) ([how to download](xref:index#how-to-download-a-sample))
329
+
*[View or download sample code](https://github.com/dotnet/AspNetCore.Docs/tree/main/aspnetcore/tutorials/first-mongo-app/samples/8.x/BookStoreApi) ([how to download](xref:index#how-to-download-a-sample))
332
330
*<xref:web-api/index>
333
331
*<xref:web-api/action-return-types>
334
332
*[Create a web API with ASP.NET Core](/training/modules/build-web-api-aspnet-core/)
0 commit comments