Esempio n. 1
0
        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));
        }
Esempio n. 2
0
        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));
        }
Esempio n. 3
0
        private string BuildSqlWithCondition(string tableName, dynamic condition)
        {
            var sqlWhere = new SqlWhereBuilder(condition).Build();

            return(String.Format("DELETE FROM {0}s WHERE {1}", tableName, sqlWhere));
        }
Esempio n. 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));
        }