AspNetCore.Docs/aspnet/whitepapers/what-is-new-in-aspnet-mvc/samples/sample2.cs

11 lines
311 B
C#

public class MyMvcApplication : HttpApplication {
void App_Start() {
AreaRegistration.RegisterAllAreas();
RegisterRoutes(RouteTable.Routes);
}
public static void RegisterRoutes(RouteCollection routes) {
routes.MapRoute("default", "{controller}/{action}/{id}", ...);
}
}