atakancracker
How to effectively dispose unmanaged resources?
In current case, it might be good to check if connection is already closed/disposed, if so dont try to dispose again to prevent exception. And same for querying, if connection is null or closed, create new connection
12 replies
How to effectively dispose unmanaged resources?
UserRepository as scoped service, Dispose will be called end of the scope, therefore if UserRepository is injected and used from different services within scope, if its used with using block, second call might have exception because trying to access disposed object
12 replies
.NET CORE 6 MVC Threading
for long running tasks see TaskCreationOptions.LongRunning https://github.com/davidfowl/AspNetCoreDiagnosticScenarios/blob/master/AsyncGuidance.md
22 replies