Pro EP 10 : Attribute vs Convention based routing in .NET

Muhammad Waseem
Become .NET Pro !
Feb 24, 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.

If you want to help the author in growing

  1. Subscribe my Weekly .NET Newsletter of C#/.NET
  2. Follow me on LinkedIn/Twitter OR Clap at least 50 times.
  3. Get exclusive .NET Questions & Answers by becoming a Patron , I add almost 25+ new questions with explanation per month.
  4. Download my eBook at Gum road that contains 30 .NET Tips.

--

--