From 8d305ad439bc8c6ff03ae72c921d2cd3fe5662a6 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Sun, 28 May 2023 22:07:08 +0800 Subject: [PATCH] Synchronization code --- Src/Asp.NetCore2/SqlSugar/Interface/ISimpleClient.cs | 2 +- Src/Asp.NetCore2/SqlSugar/SimpleClient.cs | 7 ++++--- Src/Asp.NetCore2/SqlSugar/Utilities/UtilMethods.cs | 1 - 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Src/Asp.NetCore2/SqlSugar/Interface/ISimpleClient.cs b/Src/Asp.NetCore2/SqlSugar/Interface/ISimpleClient.cs index 14093c056..573c033f4 100644 --- a/Src/Asp.NetCore2/SqlSugar/Interface/ISimpleClient.cs +++ b/Src/Asp.NetCore2/SqlSugar/Interface/ISimpleClient.cs @@ -8,7 +8,7 @@ namespace SqlSugar { public interface ISimpleClient where T : class, new() { - ISqlSugarClient CopyNew(); + SimpleClient CopyNew(); RepositoryType CopyNew() where RepositoryType : ISugarRepository; SimpleClient Change() where ChangeType : class, new(); RepositoryType ChangeRepository() where RepositoryType : ISugarRepository ; diff --git a/Src/Asp.NetCore2/SqlSugar/SimpleClient.cs b/Src/Asp.NetCore2/SqlSugar/SimpleClient.cs index bb30d331d..0af7316d5 100644 --- a/Src/Asp.NetCore2/SqlSugar/SimpleClient.cs +++ b/Src/Asp.NetCore2/SqlSugar/SimpleClient.cs @@ -36,10 +36,11 @@ namespace SqlSugar { return this.Context.GetSimpleClient(); } - public ISqlSugarClient CopyNew() + public SimpleClient CopyNew() { - this.Context = this.Context.CopyNew(); - return this.Context; + SimpleClient sm = new SimpleClient(); + sm.Context = this.Context.CopyNew(); + return sm; } public RepositoryType CopyNew() where RepositoryType : ISugarRepository { diff --git a/Src/Asp.NetCore2/SqlSugar/Utilities/UtilMethods.cs b/Src/Asp.NetCore2/SqlSugar/Utilities/UtilMethods.cs index aaf48c68f..4dc85ac0c 100644 --- a/Src/Asp.NetCore2/SqlSugar/Utilities/UtilMethods.cs +++ b/Src/Asp.NetCore2/SqlSugar/Utilities/UtilMethods.cs @@ -45,7 +45,6 @@ namespace SqlSugar { return; } - var splitTableAttribute = entityType.GetCustomAttribute(); if (splitTableAttribute.CustomSplitTableService != null) { context.CurrentConnectionConfig.ConfigureExternalServices.SplitTableService