mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-19 10:08:19 +08:00
Update Core
This commit is contained in:
@@ -7,6 +7,23 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace SqlSugar
|
||||
{
|
||||
public interface ISugarUnitOfWork<T> where T : SugarUnitOfWork, new()
|
||||
{
|
||||
ISqlSugarClient Db { get; set; }
|
||||
T CreateContext(bool isTran);
|
||||
}
|
||||
public class SugarUnitOfWork<T> : ISugarUnitOfWork<T> where T : SugarUnitOfWork, new()
|
||||
{
|
||||
public SugarUnitOfWork(ISqlSugarClient db)
|
||||
{
|
||||
this.Db = db;
|
||||
}
|
||||
public ISqlSugarClient Db { get; set; }
|
||||
public T CreateContext(bool isTran)
|
||||
{
|
||||
return Db.CreateContext<T>(isTran);
|
||||
}
|
||||
}
|
||||
public class SugarUnitOfWork : IDisposable
|
||||
{
|
||||
public ISqlSugarClient Db { get; internal set; }
|
||||
|
@@ -9,7 +9,7 @@ namespace SqlSugar
|
||||
{
|
||||
public interface ISugarUnitOfWork<T> where T : SugarUnitOfWork, new()
|
||||
{
|
||||
public ISqlSugarClient Db { get; set; }
|
||||
ISqlSugarClient Db { get; set; }
|
||||
T CreateContext(bool isTran);
|
||||
}
|
||||
public class SugarUnitOfWork<T> : ISugarUnitOfWork<T> where T : SugarUnitOfWork, new()
|
||||
|
Reference in New Issue
Block a user