Use async service scopes where possible

This commit is contained in:
Dominion
2023-04-13 22:37:38 -04:00
parent 334dd7c60c
commit 9b1d8d1906
@@ -31,7 +31,7 @@ namespace Tgstation.Server.Host.Database
if (operation == null)
throw new ArgumentNullException(nameof(operation));
using var scope = scopeFactory.CreateScope();
await using var scope = scopeFactory.CreateAsyncScope();
await operation(scope.ServiceProvider.GetRequiredService<IDatabaseContext>());
}
}