diff --git a/aspnetcore/tutorials/first-mongo-app.md b/aspnetcore/tutorials/first-mongo-app.md index 15c0b47656af..f8111ffba171 100644 --- a/aspnetcore/tutorials/first-mongo-app.md +++ b/aspnetcore/tutorials/first-mongo-app.md @@ -50,10 +50,10 @@ Enable MongoDB and MongoDB Shell access from anywhere on the development machine 1. Download and Install MongoDB Shell: * macOS/Linux: Choose a directory to extract the MongoDB Shell to. Add the resulting path for `mongosh` to the `PATH` environment variable. - * Windows: MongoDB Shell (mongosh.exe) is installed at *C:\Users\\AppData\Local\Programs\mongosh*. Add the resulting path for `mongosh.exe` to the `PATH` environment variable. + * Windows: MongoDB Shell (mongosh.exe) is installed at *C:\\Users\\\\\AppData\\Local\\Programs\\mongosh*. Add the resulting path for `mongosh.exe` to the `PATH` environment variable. 1. Download and Install MongoDB: * 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. - * Windows: MongoDB is installed at *C:\\Program Files\MongoDB* by default. Add *C:\\Program Files\\MongoDB\\Server\\\\\bin* to the `PATH` environment variable. + * Windows: MongoDB is installed at *C:\\Program Files\\MongoDB* by default. Add *C:\\Program Files\\MongoDB\\Server\\\\\bin* to the `PATH` environment variable. 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: * macOS/Linux: For example, `/usr/local/var/mongodb`. * Windows: For example, `C:\\BooksData`. @@ -65,14 +65,13 @@ Enable MongoDB and MongoDB Shell access from anywhere on the development machine 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/). -1. Open a MongoDB command shell instance by launching `mongosh.exe`. -1. In the command shell, connect to the default test database by running the following command: +1. Open a MongoDB command shell instance by launching `mongosh.exe`, or by running the following command in the command shell: ```console mongosh ``` -1. Run the following command in the command shell: +1. In the command shell connect to the default test database by running: ```console use BookStore @@ -268,7 +267,7 @@ The preceding web API controller: 1. Build and run the app. -1. Navigate to `https://localhost:/api/books`, where `` 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: +1. Navigate to `https://localhost:/api/books`, where `` 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: ```json [ @@ -334,7 +333,7 @@ To satisfy the preceding requirements, make the following changes: ## Additional resources -* [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)) +* [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)) * * * [Create a web API with ASP.NET Core](/training/modules/build-web-api-aspnet-core/) diff --git a/aspnetcore/tutorials/first-mongo-app/includes/first-mongo-app3-5.md b/aspnetcore/tutorials/first-mongo-app/includes/first-mongo-app3-5.md index 09ee103e6022..1395e50803e6 100644 --- a/aspnetcore/tutorials/first-mongo-app/includes/first-mongo-app3-5.md +++ b/aspnetcore/tutorials/first-mongo-app/includes/first-mongo-app3-5.md @@ -354,6 +354,7 @@ To satisfy the preceding requirements, make the following changes: For more information on building ASP.NET Core web APIs, see the following resources: +* [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)) * [YouTube version of this article](https://www.youtube.com/watch?v=7uJt_sOenyo&feature=youtu.be) * * diff --git a/aspnetcore/tutorials/first-mongo-app/includes/first-mongo-app6.md b/aspnetcore/tutorials/first-mongo-app/includes/first-mongo-app6.md index 14513488da03..b6173c0c6d0b 100644 --- a/aspnetcore/tutorials/first-mongo-app/includes/first-mongo-app6.md +++ b/aspnetcore/tutorials/first-mongo-app/includes/first-mongo-app6.md @@ -45,14 +45,13 @@ Enable MongoDB and Mongo DB Shell access from anywhere on the development machin 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/). -1. Open a MongoDB command shell instance by launching `mongosh.exe`. -1. In the command shell connect to the default test database by running the following command: +1. Open a MongoDB command shell instance by launching `mongosh.exe`, or by running the following command in the command shell: ```console mongosh ``` -1. Run the following command in the command shell: +1. In the command shell connect to the default test database by running: ```console use BookStore @@ -320,7 +319,7 @@ To satisfy the preceding requirements, make the following changes: ## Additional resources -* [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)) +* [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)) * * * [Create a web API with ASP.NET Core](/training/modules/build-web-api-aspnet-core/) diff --git a/aspnetcore/tutorials/first-mongo-app/includes/first-mongo-app7.md b/aspnetcore/tutorials/first-mongo-app/includes/first-mongo-app7.md index 56a42cbe2a5c..92c198a4564b 100644 --- a/aspnetcore/tutorials/first-mongo-app/includes/first-mongo-app7.md +++ b/aspnetcore/tutorials/first-mongo-app/includes/first-mongo-app7.md @@ -45,14 +45,13 @@ Enable MongoDB and Mongo DB Shell access from anywhere on the development machin 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/). -1. Open a MongoDB command shell instance by launching `mongosh.exe`. -1. In the command shell connect to the default test database by running the following command: +1. Open a MongoDB command shell instance by launching `mongosh.exe`, or by running the following command in the command shell: ```console mongosh ``` -1. Run the following command in the command shell: +1. In the command shell connect to the default test database by running: ```console use BookStore @@ -321,7 +320,7 @@ To satisfy the preceding requirements, make the following changes: ## Additional resources -* [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)) +* [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)) * * * [Create a web API with ASP.NET Core](/training/modules/build-web-api-aspnet-core/) diff --git a/aspnetcore/tutorials/first-mongo-app/includes/first-mongo-app8.md b/aspnetcore/tutorials/first-mongo-app/includes/first-mongo-app8.md index ff275e3a87be..6af18426df2b 100644 --- a/aspnetcore/tutorials/first-mongo-app/includes/first-mongo-app8.md +++ b/aspnetcore/tutorials/first-mongo-app/includes/first-mongo-app8.md @@ -37,10 +37,10 @@ Enable MongoDB and MongoDB Shell access from anywhere on the development machine 1. Download and Install MongoDB Shell: * macOS/Linux: Choose a directory to extract the MongoDB Shell to. Add the resulting path for `mongosh` to the `PATH` environment variable. - * Windows: MongoDB Shell (mongosh.exe) is installed at *C:\Users\\AppData\Local\Programs\mongosh*. Add the resulting path for `mongosh.exe` to the `PATH` environment variable. + * Windows: MongoDB Shell (mongosh.exe) is installed at *C:\\Users\\\\\AppData\\Local\\Programs\\mongosh*. Add the resulting path for `mongosh.exe` to the `PATH` environment variable. 1. Download and Install MongoDB: * 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. - * Windows: MongoDB is installed at *C:\\Program Files\MongoDB* by default. Add *C:\\Program Files\\MongoDB\\Server\\\\\bin* to the `PATH` environment variable. + * Windows: MongoDB is installed at *C:\\Program Files\\MongoDB* by default. Add *C:\\Program Files\\MongoDB\\Server\\\\\bin* to the `PATH` environment variable. 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: * macOS/Linux: For example, `/usr/local/var/mongodb`. * Windows: For example, `C:\\BooksData`. @@ -52,15 +52,13 @@ Enable MongoDB and MongoDB Shell access from anywhere on the development machine 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/). -1. Open a MongoDB command shell instance by launching `mongosh.exe`. -1. In the command shell, connect to the default test database by running the following command: +1. Open a MongoDB command shell instance by launching `mongosh.exe`, or by running the following command in the command shell: ```console mongosh ``` -1. Run the following command in the command shell: - +1. In the command shell connect to the default test database by running: ```console use BookStore ``` @@ -262,7 +260,7 @@ The preceding web API controller: 1. Build and run the app. -1. Navigate to `https://localhost:/api/books`, where `` 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: +1. Navigate to `https://localhost:/api/books`, where `` 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: ```json [ @@ -328,7 +326,7 @@ To satisfy the preceding requirements, make the following changes: ## Additional resources -* [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)) +* [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)) * * * [Create a web API with ASP.NET Core](/training/modules/build-web-api-aspnet-core/)