diff --git a/src/DotNetCore.CAP.MySql/CAP.MySqlCapOptionsExtension.cs b/src/DotNetCore.CAP.MySql/CAP.MySqlCapOptionsExtension.cs index 7e3a380..ffffd0e 100644 --- a/src/DotNetCore.CAP.MySql/CAP.MySqlCapOptionsExtension.cs +++ b/src/DotNetCore.CAP.MySql/CAP.MySqlCapOptionsExtension.cs @@ -22,6 +22,8 @@ namespace DotNetCore.CAP public void AddServices(IServiceCollection services) { services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); services.AddTransient(); diff --git a/src/DotNetCore.CAP.RabbitMQ/CAP.RabbitMQCapOptionsExtension.cs b/src/DotNetCore.CAP.RabbitMQ/CAP.RabbitMQCapOptionsExtension.cs index 4ed02f7..169835f 100644 --- a/src/DotNetCore.CAP.RabbitMQ/CAP.RabbitMQCapOptionsExtension.cs +++ b/src/DotNetCore.CAP.RabbitMQ/CAP.RabbitMQCapOptionsExtension.cs @@ -4,6 +4,7 @@ using System; using DotNetCore.CAP.Internal; using DotNetCore.CAP.RabbitMQ; +using DotNetCore.CAP.Transport; using Microsoft.Extensions.DependencyInjection; // ReSharper disable once CheckNamespace @@ -23,6 +24,7 @@ namespace DotNetCore.CAP services.AddSingleton(); services.Configure(_configure); + services.AddSingleton(); services.AddSingleton(); services.AddSingleton();