From 43011dc52a37af262a3ca9d01c577f2f957a68b8 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Wed, 17 Jan 2024 18:45:41 +0800 Subject: [PATCH] Add DateValue(DateTimeOffset) --- .../SqlSugar/ExpressionsToSql/DbMethods/SqlFunc.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/DbMethods/SqlFunc.cs b/Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/DbMethods/SqlFunc.cs index 1e6e969bc..dfb9d5eec 100644 --- a/Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/DbMethods/SqlFunc.cs +++ b/Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/DbMethods/SqlFunc.cs @@ -284,8 +284,11 @@ namespace SqlSugar } public static bool DateIsSame(DateTime date1, DateTime date2, DateType dataType) { throw new NotSupportedException("Can only be used in expressions"); } public static DateTime DateAdd(DateTime date, int addValue, DateType dataType) { throw new NotSupportedException("Can only be used in expressions"); } + public static DateTimeOffset DateAdd(DateTimeOffset date, int addValue, DateType dataType) { throw new NotSupportedException("Can only be used in expressions"); } public static DateTime DateAdd(DateTime date, int addValue) { throw new NotSupportedException("Can only be used in expressions"); } + public static DateTimeOffset DateAdd(DateTimeOffset 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 int DateValue(DateTimeOffset date, DateTimeOffset 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 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"); }