Pro EP 8 : Attribute vs Convention based Routing in .NET Simple Overview
Published in
Feb 23, 2023
We have two approaches for routing HTTP requests, convention-based and attribute-based routing. Both options are suitable and depends on developer choice.
Convention-Based Routing provides a centralized configuration of routes and we can put constraints as well over the routes.
Attribute-Based routing gives us facility to put routes over all actions, it is considered more flexible as compared to convention-based routing.
Which one do you prefer for Web API’s ?
If you want to help the author in growing
- Subscribe my Weekly .NET Newsletter of C#/.NET
- Follow me on LinkedIn/Twitter OR Clap at least 50 times.
- Get exclusive .NET Questions & Answers by becoming a Patron , I add almost 25+ new questions with explanation per month.
- Download my eBook at Gum road that contains 30 .NET Tips.