dotnet / AspNetCore.Docs

Documentation for ASP.NET Core
https://docs.microsoft.com/aspnet/core
Creative Commons Attribution 4.0 International
12.59k stars 25.3k forks source link

Unclear what routes variable means #9570

Closed yuriry closed 5 years ago

yuriry commented 5 years ago

There are many examples that use routes.MapRoute without mentioning what the routes variable mean. One can only guess from the Use Routing Middleware sample in the middle of the article that it is probably a RouteBuilder instance.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

guardrex commented 5 years ago

Hello @yuriry ... We're working on this topic right now on #9527. I'll see what I can do to clarify it. That's correct, it's an IRouteBuiler.

guardrex commented 5 years ago

I checked ... either via the updates on the PR or the existing content, we have it covered ...

Most apps create routes by calling \<xref:Microsoft.AspNetCore.Builder.MapRouteRouteBuilderExtensions.MapRoute*> or one of the similar extension methods defined on \. Any of the `IRouteBuilder` extension methods create an instance of \ and add it to the route collection.

Leave this issue open. It will auto-close when the PR merges. Thanks again @yuriry! :rocket: