24 lines
711 B
C#
24 lines
711 B
C#
using SqlSugar;
|
|
using YuanXuan.IM.Common.Entities;
|
|
|
|
namespace YuanXuan.IM.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();
|
|
}
|
|
}
|
|
}
|