Add SimpleClient.CopyNew()

This commit is contained in:
sunkaixuan 2023-04-20 18:19:16 +08:00
parent c5636897ce
commit 25da26eec4
2 changed files with 3 additions and 2 deletions

View File

@ -7,7 +7,7 @@ namespace SqlSugar
{
public interface ISimpleClient<T> where T : class, new()
{
void CopyNew();
ISqlSugarClient CopyNew();
RepositoryType CopyNew<RepositoryType>() where RepositoryType : ISugarRepository;
SimpleClient<ChangeType> Change<ChangeType>() where ChangeType : class, new();
RepositoryType ChangeRepository<RepositoryType>() where RepositoryType : ISugarRepository ;

View File

@ -35,9 +35,10 @@ namespace SqlSugar
{
return this.Context.GetSimpleClient<ChangeType>();
}
public void CopyNew()
public ISqlSugarClient CopyNew()
{
this.Context = this.Context.CopyNew();
return this.Context;
}
public RepositoryType CopyNew<RepositoryType>() where RepositoryType : ISugarRepository
{