Update Core

This commit is contained in:
sunkaixuan
2022-05-24 11:03:23 +08:00
parent 9b3d4ef8cd
commit a3db3c21bf

View File

@@ -10,7 +10,7 @@ namespace SqlSugar
public interface ISugarUnitOfWork<T> where T : SugarUnitOfWork, new() public interface ISugarUnitOfWork<T> where T : SugarUnitOfWork, new()
{ {
ISqlSugarClient Db { get; set; } ISqlSugarClient Db { get; set; }
T CreateContext(bool isTran); T CreateContext(bool isTran=true);
} }
public class SugarUnitOfWork<T> : ISugarUnitOfWork<T> where T : SugarUnitOfWork, new() public class SugarUnitOfWork<T> : ISugarUnitOfWork<T> where T : SugarUnitOfWork, new()
{ {
@@ -19,7 +19,7 @@ namespace SqlSugar
this.Db = db; this.Db = db;
} }
public ISqlSugarClient Db { get; set; } public ISqlSugarClient Db { get; set; }
public T CreateContext(bool isTran) public T CreateContext(bool isTran=true)
{ {
return Db.CreateContext<T>(isTran); return Db.CreateContext<T>(isTran);
} }