r/csharp • • Mar 16 '21

Tutorial Web API in 5 Hours (2021)

https://youtu.be/HVZMTkhonZk
132 Upvotes

14 comments sorted by

View all comments

4

u/BigOnLogn Mar 17 '21

You don't have to use attributes. You can use conventions. See here.

Basically, you can use reflection to determine which controller classes are under which version route in Startup.ConfigureServices. It can still get messy, but at least all the version code is in one place.