-
Notifications
You must be signed in to change notification settings - Fork 25.1k
corrections in First mongo app #35163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
8cd5439 to
1348648
Compare
| 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\<user>\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\\\<user>\\AppData\\Local\\Programs\\mongosh*. Add the resulting path for `mongosh.exe` to the `PATH` environment variable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 1. Build and run the app. | ||
|
|
||
| 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: | ||
| 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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wadepickett in #32353 you explicitly added this text.
Should the docs be updates to include the OpenAPI test pages (e.g. swagger, or maybe using http files)?
I don't think this will add much to the docs, as the testing the api part only verifies retrieving the data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went back and forth on this last time we updated since it would add several steps to the tutorial and yet the json returned in the current minimal step is fairly clear and focus of the tutorial is quickly getting ASP.NET Core and MongoDB going. The more I add beyond what is minimally needed for the goal, the more we start to lose people before they get to the last sections beyond testing. For myself, I'm good with longer tutorials. But I follow the data and response too.
That said, you could follow the same Endpoints Explorer .http files for VS and swagger UI for VS Code approach from the [Create a controller-based web API tutorial)[https://review.learn.microsoft.com/en-us/aspnet/core/tutorials/first-web-api?view=aspnetcore-9.0&branch=pr-en-us-35163&tabs=visual-studio]. I think that would be nice.
Then I will keep a watch on how folks react and where they drop off the topic.
| ## 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)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no 9.x version of the docs. If desired I can create them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. If you want to that's great. This topic is on my list of many that need an update. You could update it afterwards in a new PR or this one. Up to you.
1348648 to
9b6ef1f
Compare
|
Thanks so much @timdeschryver! I will be on this review in about an hour after I get out of some meetings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@timdeschryver, this looks great! Well done!
You asked about adding the following which I commented on:
- Endpoint Explorer (.http) and Swagger UI testing instructions
- .NET 9 update to content instruction plus .NET 9 targeted app sample.
If you want to do those, and want to do them in a new PR, let me know and I will publish this PR. If you want to make those changes in this PR, that is fine too, either way.
|
@wadepickett if you're OK with it I prefer to merge this in. I will create the issues for this later today so we don't forget about it. |

Fixes #35134
Fixes #35133
Fixes #35131
Fixes invalid path
Internal previews