Adding optional id parameter to area route (#4628)

pull/4633/head
Olcay Bayram 2017-10-25 17:31:06 +02:00 committed by Scott Addie
parent ba77c8a8cf
commit 63f7bebb60
1 changed files with 3 additions and 2 deletions

View File

@ -128,8 +128,9 @@ Set up a route definition that works with your newly created areas. The [Routing
...
app.UseMvc(routes =>
{
routes.MapRoute(name: "areaRoute",
template: "{area:exists}/{controller=Home}/{action=Index}");
routes.MapRoute(
name: "areaRoute",
template: "{area:exists}/{controller=Home}/{action=Index}/{id?}");
routes.MapRoute(
name: "default",