Infrastructure/OpenAuth.BaseApp/SqlSugarBaseApp.cs

35 lines
797 B
C#
Raw Normal View History

2025-05-13 15:18:14 +08:00
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;
}
}
}