和之前的一样用法.
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() }
);
});
}