昨天晚上看到的一篇博文 Treat your .NET Minimal API Endpoint as the application layer,作者的思路让人眼前一亮
The responsibility of the endpoint as your application layer is similar to your traditional application layer. The endpoint:
- validates the request
- translates the request to something the domain or core understands
- invokes the business logic
- returns a response