From 3d704220f38a82c49440c5f675271e2d42c2ea7c Mon Sep 17 00:00:00 2001 From: JiangCYkk <1581850110@qq.com> Date: Fri, 28 Mar 2025 16:32:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=E4=B8=8A=E4=B8=8B=E6=96=87=E6=94=B9=E4=B8=BA=20services.Add()?= =?UTF-8?q?=20=E6=96=B9=E6=B3=95=EF=BC=8CTryAdd()=20=E8=AE=A9=E5=90=8E?= =?UTF-8?q?=E9=9D=A2=E7=9A=84=20YiRbacDbContext=20=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E6=B3=A8=E5=85=A5=EF=BC=8C=E5=AF=BC=E8=87=B4=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=9D=83=E9=99=90=E8=BF=87=E6=BB=A4=E5=A4=B1=E6=95=88=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Yi.Framework.SqlSugarCore/SqlSugarCoreExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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));