mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-22 20:47:28 +01:00
Use async service scopes where possible
This commit is contained in:
@@ -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>());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user