internal static void Execute(string tableName, int id)
        {
            StringBuilder query = new StringBuilder();

            query.Append($"DELETE FROM {tableName} ");
            query.Append($"WHERE id = {id}");
            SqlCommandExecuteQuery <T> .Execute(query.ToString());
        }
        internal static void Execute(T t, string tableName, string columns, string values)
        {
            StringBuilder query = new StringBuilder();

            query.Append($"INSERT INTO {tableName} ({columns}) ");
            query.Append($"VALUES({values});");
            SqlCommandExecuteQuery <T> .Execute(query.ToString(), t);
        }
Example #3
0
        internal static void Execute(T t, string tableName, int id, string columnsAndValues)
        {
            StringBuilder query = new StringBuilder();

            query.Append($"UPDATE {tableName} ");
            query.Append($"SET {columnsAndValues} ");
            query.Append($"WHERE id={id};");
            SqlCommandExecuteQuery <T> .Execute(query.ToString(), t);
        }