From ee6f6501356a86c83581e9ab330a76e7682d6400 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Fri, 21 Oct 2022 09:58:53 +0800 Subject: [PATCH] Update sqlfunc --- Src/Asp.Net/SqlSugar/ExpressionsToSql/DbMethods/SqlFunc.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/Asp.Net/SqlSugar/ExpressionsToSql/DbMethods/SqlFunc.cs b/Src/Asp.Net/SqlSugar/ExpressionsToSql/DbMethods/SqlFunc.cs index 98f033ed1..7f57dca40 100644 --- a/Src/Asp.Net/SqlSugar/ExpressionsToSql/DbMethods/SqlFunc.cs +++ b/Src/Asp.Net/SqlSugar/ExpressionsToSql/DbMethods/SqlFunc.cs @@ -188,7 +188,7 @@ namespace SqlSugar public static DateTime DateAdd(DateTime date, int addValue) { throw new NotSupportedException("Can only be used in expressions"); } public static int DateValue(DateTime date, DateType dataType) { throw new NotSupportedException("Can only be used in expressions"); } public static bool Between(object value, object start, object end) { throw new NotSupportedException("Can only be used in expressions"); } - public static TResult IIF(bool Expression, TResult thenValue, TResult elseValue) { throw new NotSupportedException("Can only be used in expressions"); } + public static TResult IIF(bool isTrue, TResult thenValue, TResult elseValue) { return isTrue ? thenValue : elseValue; } public static TResult IsNull(TResult thisValue, TResult ifNullValue) { throw new NotSupportedException("Can only be used in expressions"); } public static string MergeString(string value1,string value2) { throw new NotSupportedException("Can only be used in expressions"); } public static string MergeString(string value1, string value2,string value3) { throw new NotSupportedException("Can only be used in expressions"); }