Пример #1
0
        /// <summary>
        /// pair更新所有记录
        /// </summary>
        public static int UpdateAllRecordsByPair(Func <string> getDbTableName, FieldValuePair pairForSet)
        {
            var pairs = new List <FieldValuePair> {
                pairForSet
            };

            return(UpdateAllRecordsByPairs(getDbTableName, pairs));
        }
Пример #2
0
        /// <summary>
        /// 通过pair和filters更新符合条件的记录
        /// getDbTableName是Entity.GetDbTableName;若MySQL执行strCmd语句出错,则返回负数(一般是-1)
        /// </summary>
        public static int UpdateRecordsByPairFilters(Func <string> getDbTableName, FieldValuePair pairForSet, List <FilterInfo> filtersForWhere)
        {
            var pairs = new List <FieldValuePair> {
                pairForSet
            };

            return(UpdateRecordsByPairsFilters(getDbTableName, pairs, filtersForWhere));
        }