using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Service { public interface IGenericManager where T : class { /// /// 获取实体 /// /// 主键 /// 实体 T Get(object id); /// /// 获取实体 /// /// 主键 /// 实体 T Load(object id); /// /// 插入实体 /// /// 实体 /// ID object Save(T entity); /// /// 修改实体 /// /// 实体 void Update(T entity); /// /// 批量修改实体 /// /// 实体 void Update(IList entities); /// /// 修改或保存实体 /// /// 实体 void SaveOrUpdate(T entity); /// /// 删除实体 /// /// ID void Delete(object id); /// /// 删除实体 /// /// ID集合 void Delete(IList idList); /// /// 获取全部集合 /// /// 集合 IList LoadAll(); /// /// 分页获取全部集合 /// /// 记录总数 /// 页码 /// 每页大小 /// 集合 IList LoadAllWithPage(out long count, int pageIndex, int pageSize); } }