From 9b1d8d1906f434d10db446bf16b5ef1705f4befb Mon Sep 17 00:00:00 2001 From: Dominion Date: Thu, 13 Apr 2023 22:37:38 -0400 Subject: [PATCH] Use async service scopes where possible --- src/Tgstation.Server.Host/Database/DatabaseContextFactory.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tgstation.Server.Host/Database/DatabaseContextFactory.cs b/src/Tgstation.Server.Host/Database/DatabaseContextFactory.cs index 41f2da0040..7f4bc19049 100644 --- a/src/Tgstation.Server.Host/Database/DatabaseContextFactory.cs +++ b/src/Tgstation.Server.Host/Database/DatabaseContextFactory.cs @@ -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()); } }