Nice example of how abstractions subtly mess with code, even for great engineers.
The "invoiceService" is the enemy here. Without it you would just be writing the attached code.
Because you had a service abstraction over a simple ef query, you lost the ability for easy joins.
Love doing tests with this library. I spin up mostly postgres instances.
Allows me to easily go "through the front door" and test as close to the real system as possible.
Integration test? Unit test? I don't care about the difference anymore.
Been absolutely loving this architecture, especially with FastEndpoints.
I throw almost everything into the endpoint file these days. Request, response, validators, error codes.
Simplicity is king.