public void RegisterRoutes(IRoutingHandler routingHandler) { routingHandler.MapRoute("Default","~/{controller}/{action}/{id}", new { Controller = "WebApi", Action = "Index", Id = RoutingParameter.Optional }); }
public void RegisterRoutes(IRoutingHandler routes) { routes.MapRoute( name: "DefaultApi", url: "api/{controller}/{id}", defaults: new { id = RoutingParameter.Optional }); // Uncomment the following line of code to enable query support for actions with an IQueryable or IQueryable<T> return type. // To avoid processing unexpected or malicious queries, use the validation settings on QueryableAttribute to validate incoming queries. // For more information, visit http://go.microsoft.com/fwlink/?LinkId=279712. routes.EnableQuerySupport(); }
public void RegisterRoutes(IRoutingHandler routes) { //routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapStaticRoute("/"); routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Home", action = "Index", id = RoutingParameter.Optional } ); }
public void RegisterRoutes(IRoutingHandler handler) { handler.MapStaticRoute("~/static"); handler.MapRoute("","~/catchall/{*allThatCanBe}", new { controller = "CatchAll", action = "CatchAll" }); handler.MapRoute("", "~/{controller}/{action}/{id}", new { controller = "Home", action = "Index", id = RoutingParameter.Optional }); }
public void UnregisterRouting(IRoutingHandler routingService) { if (_routingHandler == routingService) { _routingHandler = null; } }
public void RegisterRouting(IRoutingHandler routingService) { _routingHandler = routingService; ServiceLocator.Locator.Register<IRoutingHandler>(routingService); CallClientInitializers(); }
public UrlHelper(IHttpContext context, IRoutingHandler routingHandler) { _context = context; _routingHandler = routingHandler; }