瀏覽代碼

Fixed sqlserver connection async issue

master
Savorboard 5 年之前
父節點
當前提交
f37fd9ac09
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      src/DotNetCore.CAP.SqlServer/IStorageInitializer.SqlServer.cs

+ 1
- 1
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);
}


Loading…
取消
儲存