DEV Community

Discussion on: Adding Startup.cs back to .NET 6 Project

Collapse
 
pbouillon profile image
Pierre Bouillon

I have to admit that you are right, the Program.cs does look like a good idea but the fact that it is blowing up when configuring a bigger application might show that it may not be the best way to reduce the boilerplate

As for minimal API it seems that a lot of people are doing the same. Still in .NET 7, they introduces RouteGroups to create such pseudo-controllers and keep it a little bit more coherent

However, I think that it may not be ideal if you are defining endpoints in a single pseudo-controller and they all have specific configuration as for their routes / authorization / metadata / etc.