diff --git a/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/SqlSugarCoreExtensions.cs b/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/SqlSugarCoreExtensions.cs index 535cd3ff..1f1fc627 100644 --- a/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/SqlSugarCoreExtensions.cs +++ b/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/SqlSugarCoreExtensions.cs @@ -26,7 +26,7 @@ public static class SqlSugarCoreExtensions ServiceLifetime serviceLifetime = ServiceLifetime.Transient) where TDbContext : class, ISqlSugarDbContextDependencies { - services.TryAdd(new ServiceDescriptor( + services.Add(new ServiceDescriptor( typeof(ISqlSugarDbContextDependencies), typeof(TDbContext), serviceLifetime));