Re:Performance Improvements in .NET 10
by bob1029 on Wednesday September 10, 2025 @05:08PM
(#45203754)
I use the AddService() method to inject a things on occasion but its not used heavily. For lightweight apps I'll spin up things like a shared SQLiteConnection and inject it for all resources to use.
The DI pattern is simple & clean at this scale. In my top-level program I define my routes like:
The DI pattern is simple & clean at this scale. In my top-level program I define my routes like:
And then I have HandleRequest implementations like: The actual HandleRequest() method can do anything, including concerns like directly accepting and handling web socket connections.