ASP.NET Core 2 and Angular 5
上QQ阅读APP看书,第一时间看更新

Three choices to route them all

Long story short, ASP.NET Core is giving us three different choices for handling routes: enforcing the standard RESTful conventions, reverting back to the good old Convention-based Routing, or decorating the Controller files with the Attribute-based Routing. That said, we will definitely keep using a mix all of these approaches in our application to better learn when, where, and how to properly make use of either of them.

It's worth noting that Attribute-based routes, if/when defined, will override any matching Convention-based pattern: both of them, if/when defined, will override the default RESTful conventions created by the built-in app.UseMvc() method.