35 lines
797 B
C#
35 lines
797 B
C#
|
|
using ce.autofac.extension;
|
|||
|
|
using OpenAuth.Auth.Interface;
|
|||
|
|
using SqlSugar;
|
|||
|
|
|
|||
|
|
namespace OpenAuth.BaseApp
|
|||
|
|
{
|
|||
|
|
public abstract class SqlSugarBaseApp<T, TDbContext>:BLL
|
|||
|
|
where T : class, new()
|
|||
|
|
where TDbContext : SugarUnitOfWork, new()
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 用于普通的数据库操作
|
|||
|
|
/// </summary>
|
|||
|
|
protected ISimpleClient<T> Repository;
|
|||
|
|
/// <summary>
|
|||
|
|
/// 用于事务操作
|
|||
|
|
/// </summary>
|
|||
|
|
protected ISugarUnitOfWork<TDbContext> UnitWork;
|
|||
|
|
|
|||
|
|
protected IAuth _auth;
|
|||
|
|
|
|||
|
|
|
|||
|
|
public SqlSugarBaseApp(ISugarUnitOfWork<TDbContext> unitWork, ISimpleClient<T> repository, IAuth auth)
|
|||
|
|
{
|
|||
|
|
UnitWork = unitWork;
|
|||
|
|
Repository = repository;
|
|||
|
|
_auth = auth;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|