/// <summary> /// 通过指定SQL名称执行SQL语句,获得DbDataReader后,使用委托Action[DbDataReader]处理数据流 /// </summary> /// <param name="sqlName"></param> /// <param name="parameterValues"></param> /// <param name="partitionValues"></param> /// <param name="action"></param> public static void ExecuteReader(string sqlName, IDictionary <string, object> parameterValues, string partitionValues, Action <DbDataReader> action) { var sqlWrap = SqlMapping.GetSqlWrap(sqlName); ExecuteReader(sqlWrap, parameterValues, partitionValues, action); }
/// <summary> /// 通过指定SQL名称获取SQL语句,执行后返回自增值 /// </summary> /// <param name="sqlName"></param> /// <param name="parameterValues"></param> /// <param name="partitionValues">分区字段值列表</param> /// <returns></returns> public static T ExecuteIdentity <T>(string sqlName, IDictionary <string, object> parameterValues, string partitionValues) { var sqlWrap = SqlMapping.GetSqlWrap(sqlName); return(ExecuteIdentity <T>(sqlWrap, parameterValues, partitionValues)); }
/// <summary> /// /// </summary> /// <param name="sqlName"></param> /// <param name="parameterValues"></param> /// <param name="pagination"></param> /// <param name="partitionValues"></param> /// <returns></returns> public static DataTable ExecutePaginationTable(string sqlName, IDictionary <string, object> parameterValues, Pagination pagination, string partitionValues) { var sqlWrap = SqlMapping.GetSqlWrap(sqlName); return(ExecutePaginationTable(sqlWrap, parameterValues, pagination, partitionValues)); }