This commit is contained in:
454313500@qq.com
2021-03-20 15:02:23 +08:00
parent 59a42ae48f
commit 2e5b991db0
7 changed files with 95 additions and 88 deletions

View File

@@ -7,23 +7,53 @@ namespace CC.Yi.IBLL
{
public interface IBaseBll<T> where T : class, new()
{
#region
//得到全部实体
#endregion
IQueryable<T> GetAllEntities();
#region
//通过表达式得到实体
#endregion
IQueryable<T> GetEntities(Expression<Func<T, bool>> whereLambda);
int GetCount(Expression<Func<T, bool>> whereLambda);//统计数量
#region
//通过表达式得到实体,分页版本
#endregion
IQueryable<T> GetPageEntities<S>(int pageSize, int pageIndex, out int total, Expression<Func<T, bool>> whereLambda, Expression<Func<T, S>> orderByLambda, bool isAsc);
#region
//通过表达式统计数量
#endregion
int GetCount(Expression<Func<T, bool>> whereLambda);
#region
//分组
//通过表达式分组
#endregion
IQueryable<IGrouping<S, T>> GetGroup<S>(Expression<Func<T, bool>> whereLambda, Expression<Func<T, S>> groupByLambda);
IQueryable<T> GetPageEntities<S>(int pageSize, int pageIndex, out int total, Expression<Func<T, bool>> whereLambda, Expression<Func<T, S>> orderByLambda, bool isAsc);
#region
//添加实体
#endregion
T Add(T entity);
#region
//更新实体
#endregion
bool Update(T entity);
#region
//删除实体
#endregion
bool Delete(T entity);
#region
//通过id删除实体
#endregion
bool Delete(int id);
#region
//通过id列表删除多个实体
#endregion
int DeleteList(List<int> ids);
}
}