/// <summary> /// 查询数据列表、返回List /// </summary> /// <param name="strSql">Sql语句</param> /// <param name="parameters">sql语句对应参数</param> /// <returns></returns> public List <T> FindListBySql(string strSql, DbParameter[] parameters) { return(DataFactory.Database().FindListBySql <T>(strSql, parameters)); }
/// <summary> /// 查询数据、返回条数 /// </summary> /// <param name="WhereSql">条件</param> /// <param name="parameters">sql语句对应参数</param> /// <returns></returns> public int FindCount(string WhereSql, DbParameter[] parameters) { return(DataFactory.Database().FindCount <T>(WhereSql, parameters)); }
/// <summary> /// 执行SQL语句 /// </summary> /// <param name="strSql">Sql语句</param> /// <param name="parameters">sql语句对应参数</param> /// <returns></returns> public int ExecuteBySql(StringBuilder strSql, DbParameter[] parameters) { return(DataFactory.Database().ExecuteBySql(strSql, parameters)); }
/// <summary> /// 查询对象、返回实体 /// </summary> /// <param name="strSql">Sql语句</param> /// <param name="parameters">sql语句对应参数</param> /// <returns></returns> public T FindEntityBySql(string strSql, DbParameter[] parameters) { return(DataFactory.Database().FindEntityBySql <T>(strSql, parameters)); }
/// <summary> /// 查询数据、返回条数 /// <param name="propertyName">实体属性名称</param> /// <param name="propertyValue">字段值</param> /// </summary> /// <returns></returns> public int FindCount(string propertyName, string propertyValue) { return(DataFactory.Database().FindCount <T>(propertyName, propertyValue)); }
/// <summary> /// 查询对象、返回实体 /// </summary> /// <param name="propertyName">实体属性名称</param> /// <param name="propertyValue">字段值</param> /// <returns></returns> public T FindEntity(string propertyName, object propertyValue) { return(DataFactory.Database().FindEntity <T>(propertyName, propertyValue)); }
/// <summary> /// 查询对象、返回实体 /// </summary> /// <param name="WhereSql">条件</param> /// <param name="parameters">sql语句对应参数</param> /// <returns></returns> public T FindEntityByWhere(string WhereSql, DbParameter[] parameters) { return(DataFactory.Database().FindEntity <T>(WhereSql, parameters)); }
/// <summary> /// 查询数据列表、返回 DataTable /// </summary> /// <param name="WhereSql">条件</param> /// <returns></returns> public DataTable FindTable(string WhereSql) { return(DataFactory.Database().FindTable <T>(WhereSql)); }
/// <summary> /// 查询数据列表、返回 DataTable /// </summary> /// <param name="WhereSql">条件</param> /// <param name="parameters">sql语句对应参数</param> /// <returns></returns> public DataTable FindTable(string WhereSql, DbParameter[] parameters) { return(DataFactory.Database().FindTable <T>(WhereSql, parameters)); }
/// <summary> /// 查询数据列表、返回 DataTable /// </summary> /// <param name="Top">显示条数</param> /// <param name="WhereSql">条件</param> /// <param name="parameters">sql语句对应参数</param> /// <returns></returns> public DataTable FindTableTop(int Top, string WhereSql, DbParameter[] parameters) { return(DataFactory.Database().FindTableTop <T>(Top, WhereSql, parameters)); }
/// <summary> /// 查询数据列表、返回 DataTable /// </summary> /// <returns></returns> public DataTable FindTable() { return(DataFactory.Database().FindTable <T>()); }
/// <summary> /// 大批量数据插入 /// </summary> /// <param name="datatable">资料表</param> /// <returns></returns> public bool BulkInsert(DataTable datatable) { return(DataFactory.Database().BulkInsert(datatable)); }
/// <summary> /// 查询数据列表、返回 DataTable /// </summary> /// <param name="Top">显示条数</param> /// <param name="WhereSql">条件</param> /// <returns></returns> public DataTable FindTableTop(int Top, string WhereSql) { return(DataFactory.Database().FindTableTop <T>(Top, WhereSql)); }
/// <summary> /// 查询数据列表、返回 DataTable /// </summary> /// <param name="Top">显示条数</param> /// <returns></returns> public DataTable FindTableTop(int Top) { return(DataFactory.Database().FindTableTop <T>(Top)); }
/// <summary> /// 查询对象、返回实体 /// </summary> /// <param name="propertyValue">主键值</param> /// <returns></returns> public T FindEntity(object propertyValue) { return(DataFactory.Database().FindEntity <T>(propertyValue)); }
/// <summary> /// 查询数据列表、返回 DataTable /// </summary> /// <param name="strSql">Sql语句</param> /// <returns></returns> public DataTable FindTableBySql(string strSql) { return(DataFactory.Database().FindTableBySql(strSql)); }
/// <summary> /// 执行SQL语句 /// </summary> /// <param name="strSql">Sql语句</param> /// <param name="isOpenTrans">事务对象</param> /// <returns></returns> public int ExecuteBySql(StringBuilder strSql, DbTransaction isOpenTrans) { return(DataFactory.Database().ExecuteBySql(strSql, isOpenTrans)); }
/// <summary> /// 查询数据列表、返回 DataTable /// </summary> /// <param name="strSql">Sql语句</param> /// <param name="parameters">sql语句对应参数</param> /// <returns></returns> public DataTable FindTableBySql(string strSql, DbParameter[] parameters) { return(DataFactory.Database().FindTableBySql(strSql, parameters)); }
/// <summary> /// 查询对象、返回实体 /// </summary> /// <param name="WhereSql">条件</param> /// <returns></returns> public T FindEntityByWhere(string WhereSql) { return(DataFactory.Database().FindEntity <T>(WhereSql)); }
/// <summary> /// 执行SQL语句 /// </summary> /// <param name="strSql">Sql语句</param> /// <returns></returns> public int ExecuteBySql(StringBuilder strSql) { return(DataFactory.Database().ExecuteBySql(strSql)); }
/// <summary> /// 查询对象、返回实体 /// </summary> /// <param name="strSql">Sql语句</param> /// <returns></returns> public T FindEntityBySql(string strSql) { return(DataFactory.Database().FindEntityBySql <T>(strSql)); }
/// <summary> /// 查询数据列表、返回 DataTable /// </summary> /// <param name="procName">存储过程</param> /// <returns></returns> public DataTable FindTableByProc(string procName) { return(DataFactory.Database().FindTableByProc(procName)); }
/// <summary> /// 查询数据、返回条数 /// </summary> /// <returns></returns> public int FindCount() { return(DataFactory.Database().FindCount <T>()); }
/// <summary> /// 查询数据列表、返回DataSet /// </summary> /// <param name="strSql">Sql语句</param> /// <returns></returns> public DataSet FindDataSetBySql(string strSql) { return(DataFactory.Database().FindDataSetBySql(strSql)); }
/// <summary> /// 查询数据、返回条数 /// </summary> /// <param name="WhereSql">条件</param> /// <returns></returns> public int FindCount(string WhereSql) { return(DataFactory.Database().FindCount <T>(WhereSql)); }
/// <summary> /// 查询数据列表、返回DataSet /// </summary> /// <param name="strSql">存储过程</param> /// <returns></returns> public DataSet FindDataSetByProc(string procName) { return(DataFactory.Database().FindDataSetByProc(procName)); }
/// <summary> /// 查询数据、返回条数 /// </summary> /// <param name="strSql">Sql语句</param> /// <returns></returns> public int FindCountBySql(string strSql) { return(DataFactory.Database().FindCountBySql(strSql)); }
/// <summary> /// 查询数据列表、返回DataSet /// </summary> /// <param name="strSql">存储过程</param> /// <param name="parameters">sql语句对应参数</param> /// <returns></returns> public DataSet FindDataSetByProc(string procName, DbParameter[] parameters) { return(DataFactory.Database().FindDataSetByProc(procName, parameters)); }
/// <summary> /// 查询数据、返回条数 /// </summary> /// <param name="strSql">Sql语句</param> /// <param name="parameters">sql语句对应参数</param> /// <returns></returns> public int FindCountBySql(string strSql, DbParameter[] parameters) { return(DataFactory.Database().FindCountBySql(strSql, parameters)); }
/// <summary> /// 关闭数据库连接 /// </summary> public void Close() { DataFactory.Database().Close(); }