public override void RegisterArea(AreaRegistrationContext context) { context.MapRouteArea( "MyCoolArea_default", "MyCoolArea/{controller}/{action}/{id}", MVC.MyCoolArea.Blah.Index().AddRouteValue("id", UrlParameter.Optional) ); }
public override void RegisterArea(AreaRegistrationContext context) { context.MapRouteArea("", Root, MVC.LieDetectorOrThief.LikelyThief.Index()); context.MapRootRoute("", "likelythieves/add", MVC.LieDetectorOrThief.LikelyThief.AddLikelyThief(), Root); context.MapRootRoute("", "likelythieves/{likelyThiefIdNumericPart}", MVC.LieDetectorOrThief.LikelyThief.GetLikelyThief(), Root); context.MapRootRoute("", "likelythieves/{likelyThiefIdNumericPart}/edit", MVC.LieDetectorOrThief.LikelyThief.EditLikelyThief(), Root); context.MapRootRoute("", "likelythieves/{likelyThiefIdNumericPart}/accept", MVC.LieDetectorOrThief.LikelyThief.SwitchLikelyThiefStatus(), Root); context.MapRoute( "LieDetectorOrThief_default", "LieDetectorOrThief/{controller}/{action}/{id}", new { action = "Index", id = UrlParameter.Optional } ); }
public static Route MapRouteArea(this AreaRegistrationContext context, string name, string url, Task <ActionResult> taskResult, object defaults, object constraints, string[] namespaces) { return(context.MapRouteArea(name, url, taskResult.Result, defaults, constraints, namespaces)); }