Ejemplo n.º 1
0
        /// <summary>
        /// 获取Sql语句内容
        /// </summary>
        /// <returns>Sql语句内容</returns>
        public override String GetCommandText()
        {
            SqlCommandBuilder sb = new SqlCommandBuilder(this.Database);
            sb.AppendDeletePrefix().AppendTableName(this._tableName).AppendWhere(this._where);

            return sb.ToString();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 获取Sql语句内容
        /// </summary>
        /// <returns>Sql语句内容</returns>
        public override String GetCommandText()
        {
            SqlCommandBuilder sb = new SqlCommandBuilder(this._database);

            sb.AppendUpdatePrefix().AppendTableName(this._tableName);

            if (this._parameters.Count > 0)
            {
                sb.AppendUpdateSet();
            }

            sb.AppendAllParameterEquations(this._parameters).AppendWhere(this._where);

            return sb.ToString();
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 获取Sql语句内容
        /// </summary>
        /// <returns>Sql语句内容</returns>
        public override String GetCommandText()
        {
            SqlCommandBuilder sb = new SqlCommandBuilder(this.Database);
            sb.AppendInsertPrefix().AppendTableName(this._tableName);

            if (this._parameters.Count > 0)
            {
                sb.AppendAllColumnNamesWithParentheses(this._parameters).AppendInsertValues().AppendAllParameterNamesWithParentheses(this._parameters);
            }

            return sb.ToString();
        }