using FreeSql; using System; using System.Linq.Expressions; using System.Threading.Tasks; namespace Admin.Core.Repository { public interface IRepositoryBase : IBaseRepository where TEntity : class { /// /// 获得Dto /// /// /// 主键 /// Task GetAsync(TKey id); /// /// 根据条件获取Dto /// /// /// Task GetAsync(Expression> exp); /// /// 根据条件获取实体 /// /// /// Task GetAsync(Expression> exp); /// /// 软删除 /// /// 主键 /// Task SoftDeleteAsync(TKey id); /// /// 批量软删除 /// /// 主键数组 /// Task SoftDeleteAsync(TKey[] ids); /// /// 软删除 /// /// 禁用全局过滤器名 /// Task SoftDeleteAsync(Expression> exp, params string[] disableGlobalFilterNames); /// /// 递归删除 /// /// /// 禁用全局过滤器名 /// Task DeleteRecursiveAsync(Expression> exp, params string[] disableGlobalFilterNames); /// /// 递归软删除 /// /// /// 禁用全局过滤器名 /// Task SoftDeleteRecursiveAsync(Expression> exp, params string[] disableGlobalFilterNames); } public interface IRepositoryBase : IRepositoryBase where TEntity : class { } }