How it works...

Routing inside the MVC framework is a very flexible method of accessing specific Controllers, based on HTTP requests. If you need more control over the Controller that is accessed, attribute-based routing would probably be a better fit than convention-based routing. That said, there are additional things you can do when using attribute-based routing. Take a look at what is available to you as a developer when using attribute-based routing.

Get C# 7 and .NET Core Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.