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
Upgrade the info about exposing attribute routes to Warning (#17511)
* Upgrade the info about exposing attribute routes to Warning
Makes it more obvious you have to do something special, e.g. call MapControllers() to expose attribute only routes on regular (non-API) controllers. If you just comment out the default conventional route and add attribute routes to controllers, it won't work. And it is not immediately obvious why it doesn't work. This change makes those two lines more prominent.
* upgrade warning to important
Co-authored-by: Scott Addie <10702007+scottaddie@users.noreply.github.com>
Routing is configured using the <xref:Microsoft.AspNetCore.Builder.EndpointRoutingApplicationBuilderExtensions.UseRouting*> and <xref:Microsoft.AspNetCore.Builder.EndpointRoutingApplicationBuilderExtensions.UseEndpoints*> middleware. To use controllers:
91
-
92
-
* Call <xref:Microsoft.AspNetCore.Builder.ControllerEndpointRouteBuilderExtensions.MapControllers*> inside `UseEndpoints` to map [attribute routed](#ar) controllers.
93
-
* Call <xref:Microsoft.AspNetCore.Builder.ControllerEndpointRouteBuilderExtensions.MapControllerRoute*> or <xref:Microsoft.AspNetCore.Builder.ControllerEndpointRouteBuilderExtensions.MapAreaControllerRoute*>, to map [conventionally routed](#cr) controllers.
90
+
> [!IMPORTANT]
91
+
> Routing is configured using the <xref:Microsoft.AspNetCore.Builder.EndpointRoutingApplicationBuilderExtensions.UseRouting*> and <xref:Microsoft.AspNetCore.Builder.EndpointRoutingApplicationBuilderExtensions.UseEndpoints*> middleware. To use controllers:
0 commit comments