Browse Source

Add db.CopyNew

SqlSugar5
sunkaixuan 2 years ago
parent
commit
01b498d699
  1. 6
      Src/Asp.Net/SqlSugar/Abstract/SugarProvider/SqlSugarProvider.cs
  2. 4
      Src/Asp.Net/SqlSugar/Abstract/SugarProvider/SqlSugarScopeProvider.cs

6
Src/Asp.Net/SqlSugar/Abstract/SugarProvider/SqlSugarProvider.cs

@ -1341,7 +1341,11 @@ namespace SqlSugar
} }
#endregion #endregion
#region #region Other
public SqlSugarClient CopyNew()
{
return new SqlSugarClient(UtilMethods.CopyConfig(this.Ado.Context.CurrentConnectionConfig));
}
public void ThenMapper<T>(IEnumerable<T> list, Action<T> action) public void ThenMapper<T>(IEnumerable<T> list, Action<T> action)
{ {
MapperContext<T> result = new MapperContext<T>(); MapperContext<T> result = new MapperContext<T>();

4
Src/Asp.Net/SqlSugar/Abstract/SugarProvider/SqlSugarScopeProvider.cs

@ -706,6 +706,10 @@ namespace SqlSugar
{ {
return ScopedContext.UpdateNav(datas); return ScopedContext.UpdateNav(datas);
} }
public SqlSugarClient CopyNew()
{
return new SqlSugarClient(UtilMethods.CopyConfig(this.Ado.Context.CurrentConnectionConfig));
}
#endregion #endregion
} }
} }
Loading…
Cancel
Save