Synchronization code

This commit is contained in:
sunkaixuan 2023-04-21 06:02:18 +08:00
parent 25da26eec4
commit 1903e30579
2 changed files with 6 additions and 0 deletions

View File

@ -7,6 +7,7 @@ namespace SqlSugar
{
public interface ISimpleClient<T> where T : class, new()
{
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,6 +35,11 @@ namespace SqlSugar
{
return this.Context.GetSimpleClient<ChangeType>();
}
public ISqlSugarClient CopyNew()
{
this.Context = this.Context.CopyNew();
return this.Context;
}
public RepositoryType CopyNew<RepositoryType>() where RepositoryType : ISugarRepository
{
Type type = typeof(RepositoryType);