In my recent series about upgrading to ASP.NET Core 3.0, I described how the new endpoint routing system can be combined with terminal middleware (i.e. middleware that generates a response). In that post I showed how you can map a path, e.g. /version, to the terminal middleware and create an endpoint.

There are a number of benefits to this, such as removing the duplication of CORS and Authorization logic that is required in ASP.NET Core 2.x. Another benefit is that you now get proper “MVC-style” routing with placeholders and capture groups, instead of the simple “constant-prefix” Map() function that’s available in ASP.NET Core 2.0.

#asp.net core #.net core 3.0 #routing #asp.net #programming #development

Accessing Route Values In Endpoint Middleware in ASP.NET Core 3.0
5.45 GEEK