From f37fd9ac09f6deae2f8f57ae066b0e5269d2caf6 Mon Sep 17 00:00:00 2001 From: Savorboard Date: Wed, 13 Nov 2019 17:38:58 +0800 Subject: [PATCH] Fixed sqlserver connection async issue --- src/DotNetCore.CAP.SqlServer/IStorageInitializer.SqlServer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DotNetCore.CAP.SqlServer/IStorageInitializer.SqlServer.cs b/src/DotNetCore.CAP.SqlServer/IStorageInitializer.SqlServer.cs index e1c83e1..66a3bb3 100644 --- a/src/DotNetCore.CAP.SqlServer/IStorageInitializer.SqlServer.cs +++ b/src/DotNetCore.CAP.SqlServer/IStorageInitializer.SqlServer.cs @@ -44,7 +44,7 @@ namespace DotNetCore.CAP.SqlServer if (cancellationToken.IsCancellationRequested) return; var sql = CreateDbTablesScript(_options.Value.Schema); - using (var connection = new SqlConnection(_options.Value.ConnectionString)) + await using (var connection = new SqlConnection(_options.Value.ConnectionString)) { await connection.ExecuteAsync(sql); }