private string BuildSqlWithCondition(string tableName, string sqlFields, string sqlValues)
        {
            var sqlWhere = new SqlWhereBuilder(condition).Build();

            return("INSERT INTO {0}s ({1}) VALUES ({2}) WHERE {3}".FormatWith(tableName, sqlFields, sqlValues, sqlWhere));
        }
        private string BuildSqlWithCondition(dynamic condition, string sqlFields, string tableName)
        {
            var sqlWhere = new SqlWhereBuilder(condition).Build();

            return(String.Format("SELECT {0} FROM {1}s WHERE {2}", sqlFields, tableName, sqlWhere));
        }
        private string BuildSqlWithCondition(string tableName, dynamic condition)
        {
            var sqlWhere = new SqlWhereBuilder(condition).Build();

            return(String.Format("DELETE FROM {0}s WHERE {1}", tableName, sqlWhere));
        }
Exemple #4
0
        private string BuildSqlWithCondition(dynamic condition, string tableName, string sqlUpdate)
        {
            var sqlWhere = new SqlWhereBuilder(condition).Build();

            return(String.Format("UPDATE {0}s {1} WHERE {2}", tableName, sqlUpdate, sqlWhere));
        }