using FineAdmin.Model; using System; using System.Collections.Generic; namespace FineAdmin.IService { public interface IBaseService where T : class, new() { #region CRUD /// /// 根据主键返回实体 /// T GetById(int Id); /// /// 新增 /// bool Insert(T model); /// /// 根据主键修改数据 /// bool UpdateById(T model); /// /// 根据主键修改数据 修改指定字段 /// bool UpdateById(T model, string updateFields); /// /// 根据主键删除数据 /// bool DeleteById(int Id); /// /// 根据主键批量删除数据 /// bool DeleteByIds(object Ids); /// /// 根据条件删除 /// bool DeleteByWhere(string where); #endregion dynamic GetListByFilter(T filter, PageInfo pageInfo); /// /// 返回整张表数据 /// returnFields需要返回的列,用逗号隔开。默认null,返回所有列 /// IEnumerable GetAll(string returnFields = null, string orderby = null); /// /// 根据查询条件获取数据 /// IEnumerable GetByWhere(string where = null, object param = null, string returnFields = null, string orderby = null); } }