mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-18 17:48:11 +08:00
Update SimpleClient.CopyNew()
This commit is contained in:
@@ -65,7 +65,14 @@ namespace SqlSugar
|
|||||||
o = Activator.CreateInstance(type);
|
o = Activator.CreateInstance(type);
|
||||||
}
|
}
|
||||||
var result = (RepositoryType)o;
|
var result = (RepositoryType)o;
|
||||||
result.Context = this.Context.CopyNew();
|
if (result.Context != null)
|
||||||
|
{
|
||||||
|
result.Context = result.Context.CopyNew();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result.Context = this.Context.CopyNew();
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
public RepositoryType ChangeRepository<RepositoryType>() where RepositoryType : ISugarRepository
|
public RepositoryType ChangeRepository<RepositoryType>() where RepositoryType : ISugarRepository
|
||||||
|
Reference in New Issue
Block a user