/// <summary> /// 查询并获得实体 /// </summary> /// <typeparam name="T"></typeparam> /// <param name="SQLString">查询语句</param> /// <param name="cmdParms">参数列表</param> /// <returns></returns> public List <T> QueryEntList <T>(string SQLString, params MySqlParameter[] cmdParms) where T : new() { DataSet ds = Query(SQLString, cmdParms); return(EntityConverter.ToList <T>(ds.Tables[0])); }
/// <summary> /// 数据库分页 /// </summary> /// <param name="SQLString">SQL</param> /// <param name="PageSize">分页大小</param> /// <param name="PageIndex">页号</param> /// <param name="cmdParms">参数</param> /// <returns></returns> public List <T> DBPagEntList <T>(string SQLString, int PageSize, int PageIndex, params MySqlParameter[] cmdParms) where T : new() { return(EntityConverter.ToList <T>(DBPaging(SQLString, PageSize, PageIndex, cmdParms).Tables[0])); }
/// <summary> /// 获取实体集合 /// </summary> /// <typeparam name="T"></typeparam> /// <param name="SQLString">查询语句</param> /// <param name="cmdParms">参数列表</param> /// <returns></returns> public List <T> ExeReaEntList <T>(string SQLString, params MySqlParameter[] cmdParms) where T : new() { return(EntityConverter.ToList <T>(ExecuteReader(SQLString, cmdParms))); }