diff --git a/src/DotNetCore.CAP.MySql/CAP.MySqlCapOptionsExtension.cs b/src/DotNetCore.CAP.MySql/CAP.MySqlCapOptionsExtension.cs index 7ba01c5..9319ca1 100644 --- a/src/DotNetCore.CAP.MySql/CAP.MySqlCapOptionsExtension.cs +++ b/src/DotNetCore.CAP.MySql/CAP.MySqlCapOptionsExtension.cs @@ -25,8 +25,8 @@ namespace DotNetCore.CAP services.AddSingleton(); services.AddSingleton(); - services.AddScoped(); - services.AddScoped(); + services.AddScoped(); + services.AddScoped(); services.AddTransient(); services.AddTransient(); diff --git a/src/DotNetCore.CAP.MySql/CapPublisher.cs b/src/DotNetCore.CAP.MySql/ICapPublisher.MySql.cs similarity index 91% rename from src/DotNetCore.CAP.MySql/CapPublisher.cs rename to src/DotNetCore.CAP.MySql/ICapPublisher.MySql.cs index 8ce9b8d..fe83676 100644 --- a/src/DotNetCore.CAP.MySql/CapPublisher.cs +++ b/src/DotNetCore.CAP.MySql/ICapPublisher.MySql.cs @@ -14,7 +14,7 @@ using MySql.Data.MySqlClient; namespace DotNetCore.CAP.MySql { - public class CapPublisher : CapPublisherBase, ICallbackPublisher, IDisposable + public class MySqlPublisher : CapPublisherBase, ICallbackPublisher, IDisposable { private readonly DbContext _dbContext; private readonly MySqlOptions _options; @@ -22,7 +22,7 @@ namespace DotNetCore.CAP.MySql private MySqlConnection _connection; - public CapPublisher(IServiceProvider provider, MySqlOptions options) : base(provider) + public MySqlPublisher(IServiceProvider provider, MySqlOptions options) : base(provider) { _options = options; @@ -49,7 +49,7 @@ namespace DotNetCore.CAP.MySql dbTrans = dbContextTrans.GetDbTransaction(); } var conn = dbTrans?.Connection; - return conn.ExecuteScalarAsync(PrepareSql(), message, dbTrans); + return conn.ExecuteAsync(PrepareSql(), message, dbTrans); } protected override object GetDbTransaction() diff --git a/src/DotNetCore.CAP.MySql/MySqlStorage.cs b/src/DotNetCore.CAP.MySql/IStorage.MySql.cs similarity index 100% rename from src/DotNetCore.CAP.MySql/MySqlStorage.cs rename to src/DotNetCore.CAP.MySql/IStorage.MySql.cs diff --git a/src/DotNetCore.CAP.MySql/MySqlStorageConnection.cs b/src/DotNetCore.CAP.MySql/IStorageConnection.MySql.cs similarity index 100% rename from src/DotNetCore.CAP.MySql/MySqlStorageConnection.cs rename to src/DotNetCore.CAP.MySql/IStorageConnection.MySql.cs diff --git a/src/DotNetCore.CAP.MySql/MySqlStorageTransaction.cs b/src/DotNetCore.CAP.MySql/IStorageTransaction.MySql.cs similarity index 100% rename from src/DotNetCore.CAP.MySql/MySqlStorageTransaction.cs rename to src/DotNetCore.CAP.MySql/IStorageTransaction.MySql.cs