Synchronization code

This commit is contained in:
sunkaixuan
2023-01-18 00:53:06 +08:00
parent 9bab04c752
commit beab91d34a

View File

@@ -24,7 +24,18 @@ namespace SqlSugar
return Db.CreateContext<T>(isTran);
}
}
public class SugarUnitOfWork : IDisposable
public interface ISugarUnitOfWork
{
ISqlSugarClient Db { get; }
ITenant Tenant { get; }
SimpleClient<T> GetRepository<T>() where T : class, new();
RepositoryType GetMyRepository<RepositoryType>() where RepositoryType : ISugarRepository, new();
bool Commit();
}
public class SugarUnitOfWork : IDisposable, ISugarUnitOfWork
{
public ISqlSugarClient Db { get; internal set; }
public ITenant Tenant { get; internal set; }