Esempio n. 1
0
        private void AddInsertSetting(string columnName, object columnValue, DbType dbType, bool isExpression)
        {
            InsertSetting setting = new InsertSetting
            {
                ColumnName    = columnName,
                ParameterName = _provider.ParameterPrefix + "ins_" + columnName.ToAlphaNumericOnly(),
                Value         = columnValue,
                IsExpression  = isExpression,
                DataType      = dbType
            };

            Inserts.Add(setting);
        }
Esempio n. 2
0
        private void AddInsertSetting(string columnName, object columnValue, DbType dbType, int?maxLenth, bool isExpression)
        {
            InsertSetting setting = new InsertSetting
            {
                ColumnName    = columnName,
                ParameterName = _provider.ParameterPrefix + "ins_" + Guid.NewGuid().ToString().Replace('-', '_').Substring(0, 25),
                Value         = columnValue,
                IsExpression  = isExpression,
                DataType      = dbType,
            };

            if (maxLenth.HasValue)
            {
                setting.MaxLength = maxLenth.Value;
            }
            Inserts.Add(setting);
        }