using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Text; using System.Threading.Tasks; namespace WorkFlowApi.IBusiness { public interface IBaseBusiness where T : class, new() { #region 存在数据 /// /// 是否存在 /// /// 实体对象 /// 存在字段 /// bool Exists(T entity, string field); #endregion #region 增加数据 /// /// 添加数据 /// /// 实体对象 int Insert(T entity); int InsertExe(T entity); /// /// 添加多条数据 /// /// 实体对象集合 int InsertList(List entities); int InsertListExe(List entities); #endregion #region 删除数据 /// /// 删除指定主键数据 /// /// int Delete(string key); int DeleteExe(string key, string Field); /// /// 通过主键删除多条数据 /// /// int DeleteList(List keys); /// /// 删除单条数据 /// /// 实体对象 int DeleteEntity(T entity); /// /// 删除多条数据 /// /// 实体对象集合 int DeleteEntityList(List entities); #endregion #region 更新数据 /// /// 更新一条数据 /// /// 实体对象 int Update(T entity); int UpdateExe(T entity); /// /// 更新多条数据 /// /// 数据列表 int UpdateList(List entities); #endregion #region 查询数据 /// /// 获取实体 /// /// 主键 /// T GetEntity(string keyValue); /// /// 获取表的所有数据 /// /// List GetAllList(); /// /// 查询列表 /// /// /// /// List GetList(string WhereStr, string OrderStr); /// /// 分页列表返回DataTable /// /// /// /// /// /// /// DataTable GetDataTablePage(string WhereStr, string OrderStr, int PageSize, int PageIndex, out int RecordCount); /// /// 分页列表返回List /// /// /// /// /// /// /// List GetListPage(string WhereStr, string OrderStr, int PageSize, int PageIndex, out int RecordCount); #endregion } }