24 lines
723 B
C#
24 lines
723 B
C#
using LearningOfficer.OA.Core.Entities;
|
|
using SqlSugar;
|
|
|
|
namespace LearningOfficer.OA.Infrastructure.DBContext
|
|
{
|
|
/// <summary>
|
|
/// SqlSugar通用仓储类
|
|
/// </summary>
|
|
/// <typeparam name="TEntity"></typeparam>
|
|
public class SugarRepository<TEntity> : SimpleClient<TEntity> where TEntity : BaseEntity, new()
|
|
{
|
|
public SugarRepository(ISqlSugarClient sugarClient) : base(sugarClient)
|
|
{
|
|
var db = sugarClient.AsTenant().GetConnectionWithAttr<TEntity>();
|
|
base.Context = db;
|
|
}
|
|
|
|
public IEnumerable<object> Queryable<T1, T2>(Func<object, object, JoinQueryInfos> value)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
}
|