mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-04 04:37:58 +08:00
Synchronization code
This commit is contained in:
parent
c47a5c3ad8
commit
9f8b7c16b9
@ -24,17 +24,17 @@ namespace SqlSugar
|
||||
return Db.CreateContext<T>(isTran);
|
||||
}
|
||||
}
|
||||
public interface ISaugarUnitOfWorkClear
|
||||
public interface ISugarUnitOfWorkClear
|
||||
{
|
||||
RepositoryType GetMyRepository<RepositoryType>() where RepositoryType : new();
|
||||
|
||||
bool Commit();
|
||||
}
|
||||
/// <summary>
|
||||
/// ISaugarUnitOfWorkClear not exists SqlSugar method
|
||||
/// ISugarUnitOfWorkClear not exists SqlSugar method
|
||||
/// ISugarUnitOfWork exists SqlSugar method
|
||||
/// </summary>
|
||||
public interface ISugarUnitOfWork : ISaugarUnitOfWorkClear
|
||||
public interface ISugarUnitOfWork : ISugarUnitOfWorkClear
|
||||
{
|
||||
ISqlSugarClient Db { get; }
|
||||
ITenant Tenant { get; }
|
||||
|
@ -24,19 +24,28 @@ namespace SqlSugar
|
||||
return Db.CreateContext<T>(isTran);
|
||||
}
|
||||
}
|
||||
public interface ISaugarUnitOfWorkClear
|
||||
public interface ISugarUnitOfWorkClear
|
||||
{
|
||||
RepositoryType GetMyRepository<RepositoryType>() where RepositoryType : new();
|
||||
|
||||
bool Commit();
|
||||
}
|
||||
public interface ISugarUnitOfWork : ISaugarUnitOfWorkClear
|
||||
/// <summary>
|
||||
/// ISugarUnitOfWorkClear not exists SqlSugar method
|
||||
/// ISugarUnitOfWork exists SqlSugar method
|
||||
/// </summary>
|
||||
public interface ISugarUnitOfWork : ISugarUnitOfWorkClear
|
||||
{
|
||||
ISqlSugarClient Db { get; }
|
||||
ITenant Tenant { get; }
|
||||
|
||||
SimpleClient<T> GetRepository<T>() where T : class, new();
|
||||
}
|
||||
/// <summary>
|
||||
/// SugarUnitOfWork->ISugarUnitOfWork->ISaugarUnitOfWorkClear
|
||||
/// ISaugarUnitOfWorkClear not exists SqlSugar method
|
||||
/// ISugarUnitOfWork exists SqlSugar method
|
||||
/// </summary>
|
||||
public class SugarUnitOfWork : IDisposable, ISugarUnitOfWork
|
||||
{
|
||||
public ISqlSugarClient Db { get; internal set; }
|
||||
|
Loading…
Reference in New Issue
Block a user