diff --git a/src/Http/Routing/test/testassets/RoutingSandbox/HelloExtension/EndpointRouteBuilderExtensions.cs b/src/Http/Routing/test/testassets/RoutingSandbox/HelloExtension/EndpointRouteBuilderExtensions.cs
index 14ca404a34..ac19c714b6 100644
--- a/src/Http/Routing/test/testassets/RoutingSandbox/HelloExtension/EndpointRouteBuilderExtensions.cs
+++ b/src/Http/Routing/test/testassets/RoutingSandbox/HelloExtension/EndpointRouteBuilderExtensions.cs
@@ -13,7 +13,7 @@ namespace Microsoft.AspNetCore.Builder
{
public static class EndpointRouteBuilderExtensions
{
- public static IEndpointConventionBuilder MapHello(this IEndpointRouteBuilder routes, string template, string greeter)
+ public static IEndpointConventionBuilder MapHello(this IEndpointRouteBuilder routes, string pattern, string greeter)
{
if (routes == null)
{
@@ -25,7 +25,7 @@ namespace Microsoft.AspNetCore.Builder
.Build();
return routes.Map(
- template,
+ pattern,
"Hello " + greeter,
pipeline);
}
diff --git a/src/Mvc/Mvc.Core/src/Builder/ControllerEndpointRouteBuilderExtensions.cs b/src/Mvc/Mvc.Core/src/Builder/ControllerEndpointRouteBuilderExtensions.cs
index 74b94902bb..ccc66f9ec4 100644
--- a/src/Mvc/Mvc.Core/src/Builder/ControllerEndpointRouteBuilderExtensions.cs
+++ b/src/Mvc/Mvc.Core/src/Builder/ControllerEndpointRouteBuilderExtensions.cs
@@ -62,12 +62,12 @@ namespace Microsoft.AspNetCore.Builder
///
/// Adds endpoints for controller actions to the and specifies a route
- /// with the given , ,
+ /// with the given , ,
/// , , and .
///
/// The to add the route to.
/// The name of the route.
- /// The URL pattern of the route.
+ /// The URL pattern of the route.
///
/// An object that contains default values for route parameters. The object's properties represent the
/// names and values of the default values.
@@ -83,7 +83,7 @@ namespace Microsoft.AspNetCore.Builder
public static void MapControllerRoute(
this IEndpointRouteBuilder routes,
string name,
- string template,
+ string pattern,
object defaults = null,
object constraints = null,
object dataTokens = null)
@@ -98,7 +98,7 @@ namespace Microsoft.AspNetCore.Builder
var dataSource = GetOrCreateDataSource(routes);
dataSource.AddRoute(new ConventionalRouteEntry(
name,
- template,
+ pattern,
new RouteValueDictionary(defaults),
new RouteValueDictionary(constraints),
new RouteValueDictionary(dataTokens)));
@@ -106,13 +106,13 @@ namespace Microsoft.AspNetCore.Builder
///
/// Adds endpoints for controller actions to the and specifies a route
- /// with the given , , ,
+ /// with the given , , ,
/// , , and .
///
/// The to add the route to.
/// The name of the route.
/// The area name.
- /// The URL pattern of the route.
+ /// The URL pattern of the route.
///
/// An object that contains default values for route parameters. The object's properties represent the
/// names and values of the default values.
@@ -129,7 +129,7 @@ namespace Microsoft.AspNetCore.Builder
this IEndpointRouteBuilder routes,
string name,
string areaName,
- string template,
+ string pattern,
object defaults = null,
object constraints = null,
object dataTokens = null)
@@ -150,7 +150,7 @@ namespace Microsoft.AspNetCore.Builder
var constraintsDictionary = new RouteValueDictionary(constraints);
constraintsDictionary["area"] = constraintsDictionary["area"] ?? new StringRouteConstraint(areaName);
- routes.MapControllerRoute(name, template, defaultsDictionary, constraintsDictionary, dataTokens);
+ routes.MapControllerRoute(name, pattern, defaultsDictionary, constraintsDictionary, dataTokens);
}
///
@@ -175,7 +175,7 @@ namespace Microsoft.AspNetCore.Builder
///
/// does not re-execute routing, and will
/// not generate route values based on routes defined elsewhere. When using this overload, the path route value
- /// will be available.
+ /// will be available.
///
///
/// does not attempt to disambiguate between
@@ -184,8 +184,8 @@ namespace Microsoft.AspNetCore.Builder
///
///
public static void MapFallbackToController(
- this IEndpointRouteBuilder routes,
- string action,
+ this IEndpointRouteBuilder routes,
+ string action,
string controller)
{
if (routes == null)
@@ -209,7 +209,7 @@ namespace Microsoft.AspNetCore.Builder
GetOrCreateDataSource(routes);
// Maps a fallback endpoint with an empty delegate. This is OK because
- // we don't expect the delegate to run.
+ // we don't expect the delegate to run.
routes.MapFallback(context => Task.CompletedTask).Add(b =>
{
// MVC registers a policy that looks for this metadata.
@@ -228,8 +228,8 @@ namespace Microsoft.AspNetCore.Builder
/// The controller name.
///
///
- /// is intended to handle cases
- /// where URL path of the request does not contain a file name, and no other endpoint has matched. This is convenient
+ /// is intended to handle cases
+ /// where URL path of the request does not contain a file name, and no other endpoint has matched. This is convenient
/// for routing requests for dynamic content to a SPA framework, while also allowing requests for non-existent files to
/// result in an HTTP 404.
///
@@ -242,8 +242,8 @@ namespace Microsoft.AspNetCore.Builder
///
///
/// does not re-execute routing, and will
- /// not generate route values based on routes defined elsewhere. When using this overload, the route values provided by matching
- /// will be available.
+ /// not generate route values based on routes defined elsewhere. When using this overload, the route values provided by matching
+ /// will be available.
///
///
/// does not attempt to disambiguate between
@@ -283,7 +283,7 @@ namespace Microsoft.AspNetCore.Builder
GetOrCreateDataSource(routes);
// Maps a fallback endpoint with an empty delegate. This is OK because
- // we don't expect the delegate to run.
+ // we don't expect the delegate to run.
routes.MapFallback(pattern, context => Task.CompletedTask).Add(b =>
{
// MVC registers a policy that looks for this metadata.
@@ -314,7 +314,7 @@ namespace Microsoft.AspNetCore.Builder
///
/// does not re-execute routing, and will
/// not generate route values based on routes defined elsewhere. When using this overload, the path route value
- /// will be available.
+ /// will be available.
///
///
/// does not attempt to disambiguate between
@@ -349,7 +349,7 @@ namespace Microsoft.AspNetCore.Builder
GetOrCreateDataSource(routes);
// Maps a fallback endpoint with an empty delegate. This is OK because
- // we don't expect the delegate to run.
+ // we don't expect the delegate to run.
routes.MapFallback(context => Task.CompletedTask).Add(b =>
{
// MVC registers a policy that looks for this metadata.
@@ -369,8 +369,8 @@ namespace Microsoft.AspNetCore.Builder
/// The area name.
///
///
- /// is intended to handle
- /// cases where URL path of the request does not contain a file name, and no other endpoint has matched. This is
+ /// is intended to handle
+ /// cases where URL path of the request does not contain a file name, and no other endpoint has matched. This is
/// convenient for routing requests for dynamic content to a SPA framework, while also allowing requests for non-existent files to
/// result in an HTTP 404.
///
@@ -383,7 +383,7 @@ namespace Microsoft.AspNetCore.Builder
///
///
/// does not re-execute routing, and will
- /// not generate route values based on routes defined elsewhere. When using this overload, the route values provided by matching
+ /// not generate route values based on routes defined elsewhere. When using this overload, the route values provided by matching
/// will be available.
///
///
@@ -425,7 +425,7 @@ namespace Microsoft.AspNetCore.Builder
GetOrCreateDataSource(routes);
// Maps a fallback endpoint with an empty delegate. This is OK because
- // we don't expect the delegate to run.
+ // we don't expect the delegate to run.
routes.MapFallback(pattern, context => Task.CompletedTask).Add(b =>
{
// MVC registers a policy that looks for this metadata.
diff --git a/src/Mvc/Mvc.Core/src/Builder/MvcAreaRouteBuilderExtensions.cs b/src/Mvc/Mvc.Core/src/Builder/MvcAreaRouteBuilderExtensions.cs
index f5db1df3b1..16d9b81a30 100644
--- a/src/Mvc/Mvc.Core/src/Builder/MvcAreaRouteBuilderExtensions.cs
+++ b/src/Mvc/Mvc.Core/src/Builder/MvcAreaRouteBuilderExtensions.cs
@@ -59,7 +59,7 @@ namespace Microsoft.AspNetCore.Builder
///
/// Adds a route to the with the given MVC area with the specified
- /// , , ,
+ /// , , ,
/// , and .
///
/// The to add the route to.
@@ -89,7 +89,7 @@ namespace Microsoft.AspNetCore.Builder
///
/// Adds a route to the with the given MVC area with the specified
- /// , , ,
+ /// , , ,
/// , , and .
///
/// The to add the route to.
diff --git a/src/Mvc/samples/MvcSandbox/Startup.cs b/src/Mvc/samples/MvcSandbox/Startup.cs
index 14c2c66686..f23c8de0c2 100644
--- a/src/Mvc/samples/MvcSandbox/Startup.cs
+++ b/src/Mvc/samples/MvcSandbox/Startup.cs
@@ -43,11 +43,11 @@ namespace MvcSandbox
builder.MapControllerRoute(
name: "default",
- template: "{controller=Home}/{action=Index}/{id?}");
+ pattern: "{controller=Home}/{action=Index}/{id?}");
builder.MapControllerRoute(
name: "transform",
- template: "Transform/{controller:slugify=Home}/{action:slugify=Index}/{id?}",
+ pattern: "Transform/{controller:slugify=Home}/{action:slugify=Index}/{id?}",
defaults: null,
constraints: new { controller = "Home" });
diff --git a/src/Mvc/test/WebSites/ApplicationModelWebSite/Startup.cs b/src/Mvc/test/WebSites/ApplicationModelWebSite/Startup.cs
index 93041038b0..439cdd8941 100644
--- a/src/Mvc/test/WebSites/ApplicationModelWebSite/Startup.cs
+++ b/src/Mvc/test/WebSites/ApplicationModelWebSite/Startup.cs
@@ -29,8 +29,8 @@ namespace ApplicationModelWebSite
{
app.UseRouting(routes =>
{
- routes.MapControllerRoute(name: "areaRoute", template: "{area:exists}/{controller=Home}/{action=Index}");
- routes.MapControllerRoute(name: "default", template: "{controller}/{action}/{id?}");
+ routes.MapControllerRoute(name: "areaRoute", pattern: "{area:exists}/{controller=Home}/{action=Index}");
+ routes.MapControllerRoute(name: "default", pattern: "{controller}/{action}/{id?}");
routes.MapRazorPages();
});
diff --git a/src/Mvc/test/WebSites/BasicWebSite/Startup.cs b/src/Mvc/test/WebSites/BasicWebSite/Startup.cs
index dc49599f62..2d82820d61 100644
--- a/src/Mvc/test/WebSites/BasicWebSite/Startup.cs
+++ b/src/Mvc/test/WebSites/BasicWebSite/Startup.cs
@@ -39,12 +39,12 @@ namespace BasicWebSite
{
routes.MapControllerRoute(
name: "ActionAsMethod",
- template: "{controller}/{action}",
+ pattern: "{controller}/{action}",
defaults: new { controller = "Home", action = "Index" });
routes.MapControllerRoute(
- name: "PageRoute",
- template: "{controller}/{action}/{page}");
+ name: "PageRoute",
+ pattern: "{controller}/{action}/{page}");
});
}
}
diff --git a/src/Mvc/test/WebSites/HtmlGenerationWebSite/Startup.cs b/src/Mvc/test/WebSites/HtmlGenerationWebSite/Startup.cs
index e3674aeed8..1a36418505 100644
--- a/src/Mvc/test/WebSites/HtmlGenerationWebSite/Startup.cs
+++ b/src/Mvc/test/WebSites/HtmlGenerationWebSite/Startup.cs
@@ -34,15 +34,15 @@ namespace HtmlGenerationWebSite
{
routes.MapControllerRoute(
name: "areaRoute",
- template: "{area:exists}/{controller}/{action}/{id?}",
+ pattern: "{area:exists}/{controller}/{action}/{id?}",
defaults: new { action = "Index" });
routes.MapControllerRoute(
name: "productRoute",
- template: "Product/{action}",
+ pattern: "Product/{action}",
defaults: new { controller = "Product" });
routes.MapControllerRoute(
name: "default",
- template: "{controller}/{action}/{id?}",
+ pattern: "{controller}/{action}/{id?}",
defaults: new { controller = "HtmlGeneration_Home", action = "Index" });
routes.MapRazorPages();
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Startup.cs b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Startup.cs
index 05e98d0a57..dc24469393 100644
--- a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Startup.cs
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Startup.cs
@@ -161,7 +161,7 @@ namespace Company.WebApplication1
{
routes.MapControllerRoute(
name: "default",
- template: "{controller=Home}/{action=Index}/{id?}");
+ pattern: "{controller=Home}/{action=Index}/{id?}");
routes.MapRazorPages();
});
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/Startup.fs b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/Startup.fs
index d725497709..e8a2b45c3d 100644
--- a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/Startup.fs
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/Startup.fs
@@ -44,7 +44,7 @@ type Startup private () =
app.UseRouting(fun routes ->
routes.MapControllerRoute(
name = "default",
- template = "{controller=Home}/{action=Index}/{id?}") |> ignore
+ pattern = "{controller=Home}/{action=Index}/{id?}") |> ignore
routes.MapRazorPages() |> ignore) |> ignore
app.UseAuthorization() |> ignore