您的位置:首页 > 编程语言 > ASP

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

2017-09-11 19:15 1161 查看
和之前的一样用法.

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() }
);
});
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: