mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2026-02-27 16:50:33 +08:00
Synchronization code
This commit is contained in:
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user