标签: asp.net-core asp.net-core-mvc
为什么我们需要路由中间件
当下面代码中显示的app.UseMvc足以进行路由时。
app.UseMvc(routes => { routes.MapRoute( name: "default", template: "{controller}/{action}/{id?}", defaults: new { controller = "Home", action = "Index" } ); }