コード例 #1
0
        private string GetSaveSql(MacroOrder macroOrder)
        {
            return(string.Format(
                       @"IF NOT EXISTS (SELECT * FROM Rhetos.MacroEvaluatorOrder WHERE EvaluatorName = {0})
	INSERT INTO Rhetos.MacroEvaluatorOrder (EvaluatorName, EvaluatorOrder) VALUES (LEFT({0}, 256), {1});
ELSE
	UPDATE Rhetos.MacroEvaluatorOrder SET EvaluatorOrder = {1} WHERE EvaluatorName = {0};
",
                       SqlUtility.QuoteText(macroOrder.EvaluatorName),
                       macroOrder.EvaluatorOrder.ToString(CultureInfo.InvariantCulture)));
        }
コード例 #2
0
 private string GetSaveSql(MacroOrder macroOrder)
 {
     return string.Format(
     @"IF NOT EXISTS (SELECT * FROM Rhetos.MacroEvaluatorOrder WHERE EvaluatorName = {0})
     INSERT INTO Rhetos.MacroEvaluatorOrder (EvaluatorName, EvaluatorOrder) VALUES (LEFT({0}, 256), {1});
     ELSE
     UPDATE Rhetos.MacroEvaluatorOrder SET EvaluatorOrder = {1} WHERE EvaluatorName = {0};
     ",
         SqlUtility.QuoteText(macroOrder.EvaluatorName),
         macroOrder.EvaluatorOrder.ToString(CultureInfo.InvariantCulture));
 }