public override void RegisterArea(AreaRegistrationContext context) { // map /admin/products/123 context.MapLowercaseRoute( "Admin_view", "Admin/{controller}/{id}", new { controller = "Home", action = "View" }, new { id = @"\d+" }); // map /admin/products/edit/123 context.MapLowercaseRoute( "Admin_default", "Admin/{controller}/{action}/{id}", new { controller = "Home", action = "Index", id = UrlParameter.Optional }, new { action = @"^\D.*" }); }
public static Route MapLowercaseRoute( this AreaRegistrationContext context, string name, string url) { return(context.MapLowercaseRoute( name, url, null)); }
public override void RegisterArea(AreaRegistrationContext context) { context.MapLowercaseRoute( "Admin_default", "Admin/{controller}/{action}/{id}", new { action = "Index", id = UrlParameter.Optional }, new[] { "Groupr.Mvc.Areas.Admin.Controllers" } ); }
public static Route MapLowercaseRoute( this AreaRegistrationContext context, string name, string url, object defaults, string[] namespaces) { return(context.MapLowercaseRoute( name, url, defaults, null, namespaces)); }
public static Route MapLowercaseRoute( this AreaRegistrationContext context, string name, string url, object defaults, object constraints) { return(context.MapLowercaseRoute( name, url, defaults, constraints, null)); }