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
If it's OK, I'd like to work on this issue.
Let me know if I can help in any way.
Because minimal is the default now, I think this can be fixed by updating the dotnet new command to use controllers:
- dotnet new webapi -o BookStoreApi+ dotnet new webapi --use-controllers -o BookStoreApi
Side note: I noticed the codesample used in the article references the 6.x code, while there's a newer 8.x example. I can also update this and create a 9.x example and update the instructions to use .NET 9. I also mention this because the article uses 8.x.
Description
Hello, the problem I found is that you have to manually add the:
middleware in the Program.cs file.
It does not get generated automatically when using the console command:
dotnet new webapi -o BookStoreApi
Without it, the routes don't get called.
Page URL
https://learn.microsoft.com/en-us/aspnet/core/tutorials/first-mongo-app?view=aspnetcore-8.0&tabs=visual-studio-code#test-the-web-api
Content source URL
https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/tutorials/first-mongo-app.md
Document ID
83a5cb3b-23bc-4f0c-cd1c-1d1ffeb1131a
Article author
@wadepickett
Related Issues
The text was updated successfully, but these errors were encountered: