mvcアプリケーションに複数のルートがあります。アプリケーション内の複数のルートがパフォーマンスに悪いことであるか知りたいですか?
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Faq",
"Faq/{action}",
new { controller = "Faq", action = "Index" }
);
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"PostArchive",
"Post/{action}",
new { controller = "Post", action = "PostArchive" }
);
routes.MapRoute(
"LogOn",
"Account/{action}",
new { controller = "Account", action = "LogOn" }
);
routes.MapRoute(
"Localization",
"{lang}/{controller}/{action}/{id}",
new { controller = "Home", action = "Index", id = UrlParameter.Optional, lang = UrlParameter.Optional } // Parameter defaults
);
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}/{Name}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional, name = UrlParameter.Optional },
namespaces: new[] { "MVCTemplateProject.Controllers" }
);
routes.MapRoute(
name: "Post",
url: "{lang}/{controller}/{action}/{id}/{Title}",
defaults: new { controller = "Post", action = "Index", id = UrlParameter.Optional, Title = UrlParameter.Optional },
namespaces: new[] { "MVCTemplateProject.Controllers" }
);