Combining routing for ASP.NET MVC, the ASP.NET Web API, and Angular
Routing is the process of decomposing an endpoint to identify a module or controller and action that can handle a request. Routing makes the URL readable and meaningful. It also helps in hiding data from users.
Routing in ASP.NET MVC
ASP.NET MVC routing maps the request to the controller actions. All routes will be defined in the route table and are used by the route engine to match the URL patterns of the requests with the controllers and actions.
We can add the routes to the route table in the configure method of the Startup.cs
file. The following code snippet shows the default route registered on the route table:
public void Configure(IApplicationBuilder app) { app.UseIISPlatformHandler(); app.UseDefaultFiles(); app.UseStaticFiles(); app.UseMvc(config => { config.MapRoute( name: "Default", template: "{controller}/{action}/{id?}", defaults: new {...