.NET and ASP.NET Core 10 · ASP.NET Core code
Map controllers
Enable attribute-routed controllers.
builder.Services.AddControllers();
// ...
app.MapControllers();
Official .NET and ASP.NET Core 10 documentation
More asp.net core code commands
- Write a minimal API
- Register a service
- Read configuration
- Set up user secrets
- Store a development secret
- Add authentication and authorization
All asp.net core code commands · .NET and ASP.NET Core 10 cheatsheet