namespace LFlow.Base.Interfaces; /// /// 通用的仓库对象接口 /// /// 数据模型 /// 主键 public interface IRepo where T : IDataModel { /// /// 获取单个对象 /// /// /// T Get(K id); /// /// 删除单个对象 /// /// /// int DeleteById(K id); /// /// 保存与更新 /// /// /// /// T SaveOrUpdate(T entity, bool isUpdate); /// /// 获取所有对象列表(默认分页) /// /// /// /// /// List GetAll(int pageIndex, int pageSize, ref int pageTotal); /// /// 根据条件搜索对象列表 /// /// /// List Search(T whereObj); /// /// 根据条件搜索主键列表 /// /// /// List WhereSearchId(T whereObj); }