Adding a Custom Inline Route Constraint in ASP.NET Core 1.0

added by DotNetKicks
6/23/2016 9:55:05 PM

2 Kicks, 780 Views

ASP.NET supports both attribute routing as well as centralized routes. That means that you can decorate your Controller Methods with your routes if you like, or you can map routes all in one place. Here's an attribute route as an example: [Route("home/about")]public IActionResult About(){ //..} And here's one that is centralized.