mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-11-08 02:14:53 +08:00
Add db.CopyNew
This commit is contained in:
@@ -44,6 +44,7 @@ namespace SqlSugar
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Other methods
|
#region Other methods
|
||||||
|
SqlSugarClient CopyNew();
|
||||||
T CreateContext<T>(bool isTran=true) where T : SugarUnitOfWork, new();
|
T CreateContext<T>(bool isTran=true) where T : SugarUnitOfWork, new();
|
||||||
SugarUnitOfWork CreateContext(bool isTran = true);
|
SugarUnitOfWork CreateContext(bool isTran = true);
|
||||||
SplitTableContext SplitHelper<T>() where T : class, new();
|
SplitTableContext SplitHelper<T>() where T : class, new();
|
||||||
|
|||||||
@@ -996,6 +996,10 @@ namespace SqlSugar
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Other method
|
#region Other method
|
||||||
|
public SqlSugarClient CopyNew()
|
||||||
|
{
|
||||||
|
return new SqlSugarClient(UtilMethods.CopyConfig(this.Ado.Context.CurrentConnectionConfig));
|
||||||
|
}
|
||||||
public DateTime GetDate()
|
public DateTime GetDate()
|
||||||
{
|
{
|
||||||
return this.Context.GetDate();
|
return this.Context.GetDate();
|
||||||
|
|||||||
@@ -762,6 +762,9 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
return ScopedContext.UpdateNav(datas);
|
return ScopedContext.UpdateNav(datas);
|
||||||
}
|
}
|
||||||
|
public SqlSugarClient CopyNew()
|
||||||
|
{
|
||||||
|
return new SqlSugarClient(UtilMethods.CopyConfig(this.Ado.Context.CurrentConnectionConfig));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user