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