From 778c3529b3c840f8874903c75e46c8165872ced1 Mon Sep 17 00:00:00 2001 From: Savorboard Date: Fri, 29 Sep 2017 17:45:39 +0800 Subject: [PATCH] fix bug of connection driver. --- src/DotNetCore.CAP.PostgreSql/PostgreSqlStorage.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/DotNetCore.CAP.PostgreSql/PostgreSqlStorage.cs b/src/DotNetCore.CAP.PostgreSql/PostgreSqlStorage.cs index eed4800..5790ab4 100644 --- a/src/DotNetCore.CAP.PostgreSql/PostgreSqlStorage.cs +++ b/src/DotNetCore.CAP.PostgreSql/PostgreSqlStorage.cs @@ -1,6 +1,5 @@ using System; using System.Data; -using System.Data.SqlClient; using System.Threading; using System.Threading.Tasks; using Dapper; @@ -62,7 +61,7 @@ namespace DotNetCore.CAP.PostgreSql internal IDbConnection CreateAndOpenConnection() { - var connection = _existingConnection ?? new SqlConnection(_options.ConnectionString); + var connection = _existingConnection ?? new NpgsqlConnection(_options.ConnectionString); if (connection.State == ConnectionState.Closed) {