public override void RegisterArea(AreaRegistrationContext context) { context.CultureMapRoute( "Admin_default", "Admin/{controller}/{action}/{id}", new { action = "Index", id = UrlParameter.Optional } ); }
public override void RegisterArea(AreaRegistrationContext context) { context.CultureMapRoute( "Api_default", "Api/{controller}/{action}/{id}", new { action = "Index", id = UrlParameter.Optional }, new string[] { "Worki.Web.Areas.Api.Controllers" } ); // Register REST api routes within path /api //RestRoutes.RegisterRoutes(context, "/api"); }
public override void RegisterArea(AreaRegistrationContext context) { //home mobile context.CultureMapRoute( "", "mobile", new { controller = "Home", action = "Index" }, new string[] { "Worki.Web.Areas.Mobile.Controllers" } ); context.CultureMapRoute( "", // Nom d'itinéraire "mobile/workplaces/{action}/{id}", // URL avec des paramètres new { controller = "Localisation", action = "Index", id = UrlParameter.Optional }, // Paramètres par défaut new string[] { "Worki.Web.Areas.Mobile.Controllers" } ); context.CultureMapRoute( "Mobile_default", "mobile/{controller}/{action}/{id}", new { action = "Index", id = UrlParameter.Optional } ); }
public override void RegisterArea(AreaRegistrationContext context) { context.CultureMapRoute( "Widget_default", "Widget/{controller}/{action}/{id}", new { action = "Index", id = UrlParameter.Optional } ); var routes = context.Routes; for (var i = 0; i < routes.Count; i++) { var route = routes[i]; if (route.GetAreaToken() != "Widget") continue; routes[i] = new QueryPropagatingRoute(route, MiscHelpers.WidgetConstants.ParamToKeep); } }