diff --git a/Src/Asp.Net/SqlSugar/Interface/ISimpleClient.cs b/Src/Asp.Net/SqlSugar/Interface/ISimpleClient.cs index 96746db1c..467dc3e97 100644 --- a/Src/Asp.Net/SqlSugar/Interface/ISimpleClient.cs +++ b/Src/Asp.Net/SqlSugar/Interface/ISimpleClient.cs @@ -7,6 +7,7 @@ namespace SqlSugar { public interface ISimpleClient where T : class, new() { + ISqlSugarClient CopyNew(); RepositoryType CopyNew() where RepositoryType : ISugarRepository; SimpleClient Change() where ChangeType : class, new(); RepositoryType ChangeRepository() where RepositoryType : ISugarRepository ; diff --git a/Src/Asp.Net/SqlSugar/SimpleClient.cs b/Src/Asp.Net/SqlSugar/SimpleClient.cs index d9a7b536f..9ab529a1b 100644 --- a/Src/Asp.Net/SqlSugar/SimpleClient.cs +++ b/Src/Asp.Net/SqlSugar/SimpleClient.cs @@ -35,6 +35,11 @@ namespace SqlSugar { return this.Context.GetSimpleClient(); } + public ISqlSugarClient CopyNew() + { + this.Context = this.Context.CopyNew(); + return this.Context; + } public RepositoryType CopyNew() where RepositoryType : ISugarRepository { Type type = typeof(RepositoryType);