Пример #1
0
        public string SelectRows(IEnumerable <string> columns)
        {
            var L1 = string.Join(",", columns.Select(c => SqlColumnValuePair.FormalName(c)));

            if (L1 == string.Empty)
            {
                L1 = "*";
            }

            return(SelectRows(L1));
        }
        public bool Remove(string column)
        {
            SqlColumnValuePair found = columns.Find(c => c.ColumnName == column);

            if (found != null)
            {
                return(columns.Remove(found));
            }

            return(false);
        }
        public virtual SqlColumnValuePair Add(string name, object value)
        {
            SqlColumnValuePair found = columns.Find(c => c.ColumnName == name);

            if (found != null)
            {
                found.Value = new SqlValue(value);
                return(found);
            }
            else
            {
                var pair = new SqlColumnValuePair(name, value);
                columns.Add(pair);
                return(pair);
            }
        }