Beispiel #1
0
        public static string BuildWhere(List <KeyValuePair <string, object> > pairs)
        {
            StringBuilder sb = new StringBuilder();

            SqlUtil.AppendKeyValuePairs(sb, pairs, " AND ");
            return(sb.ToString());
        }
Beispiel #2
0
        public static string BuildUpdate(KeyValueListBase liste, string where)
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("UPDATE " + liste.TableName + " SET ");
            SqlUtil.AppendKeyValuePairs(sb, liste.Pairs, ", ");
            sb.Append(" WHERE ");
            sb.Append(where);
            return(sb.ToString());
        }