From a20833db5e0d53d85c9aba767a39ad529bd62733 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Mon, 25 Dec 2023 18:53:50 +0800 Subject: [PATCH] The field of the split-table supports DateoffsetTime --- .../SqlSugar/IntegrationServices/SplitTableService.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Src/Asp.NetCore2/SqlSugar/IntegrationServices/SplitTableService.cs b/Src/Asp.NetCore2/SqlSugar/IntegrationServices/SplitTableService.cs index ddade7fb8..c8830067b 100644 --- a/Src/Asp.NetCore2/SqlSugar/IntegrationServices/SplitTableService.cs +++ b/Src/Asp.NetCore2/SqlSugar/IntegrationServices/SplitTableService.cs @@ -74,6 +74,10 @@ namespace SqlSugar { return db.GetDate(); } + else if (value is DateTimeOffset) + { + return ((DateTimeOffset)value).DateTime; + } else if (UtilMethods.GetUnderType(value.GetType()) != UtilConstants.DateType) { throw new Exception($"DateSplitTableService Split column {splitColumn.PropertyName} not DateTime " + splitType.ToString());