Consider converting to ASP.NET Core minimal API
mauroservienti opened this issue · 1 comments
mauroservienti commented
ServiceControl uses regular ASP.NET controllers. It would be desirable to move to minimal API for the following reasons:
- minimal API is AOT friendly; it would be a step towards enabling AOT in ServiceControl
- minimal API doesn't require assembly scanning to locate controllers, which simplifies acceptance tests
When facing the task, it's important to keep in mind the impact of moving from well-scoped controllers to something with no easy way to cluster related HTTP request handlers together. For example, one option is to define sort of "modules," and then use extension methods to configure HTTP endpoints.
awright18 commented
Seems like route groups might help. It sounds like you want the best of both worlds (controllers and minimal APIs), make sense to me.