Asp.net core 学习笔记 ( Router 路由 )

和之前的一样用法. 

public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{ 
    app.UseMvc(routes =>
    { 
        routes.MapRoute(
            name: "client-side",
            template: "{action=Index}/{Id:int?}",
            defaults: new { controller = "Home" }
// constraints: new { id = new IntRouteConstraint() } ); }); }
原文地址:https://www.cnblogs.com/keatkeat/p/7506492.html