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) {