From 2ed254d4966e8f2121433a1d2cb445b7c1675378 Mon Sep 17 00:00:00 2001 From: 2881099 <2881099@qq.com> Date: Fri, 24 Nov 2023 14:30:19 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E5=90=8C=E4=B8=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Providers/FreeSql.Provider.Dameng/DamengDbFirst.cs | 6 +++++- Providers/FreeSql.Provider.Odbc/Dameng/OdbcDamengDbFirst.cs | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Providers/FreeSql.Provider.Dameng/DamengDbFirst.cs b/Providers/FreeSql.Provider.Dameng/DamengDbFirst.cs index 12619e67a..d48d4219e 100644 --- a/Providers/FreeSql.Provider.Dameng/DamengDbFirst.cs +++ b/Providers/FreeSql.Provider.Dameng/DamengDbFirst.cs @@ -55,7 +55,11 @@ DmDbType GetSqlDbType(DbColumnInfo column) case "char(36)": return DmDbType.Char; } - if (dbfull?.StartsWith("datetime(") == true) return DmDbType.DateTime; + if (dbfull?.StartsWith("datetime(") == true) + { + _dicDbToCs.TryAdd(dbfull, _dicDbToCs["timestamp(6)"]); + return DmDbType.DateTime; + } switch (column.DbTypeText?.ToLower()) { case "bit": diff --git a/Providers/FreeSql.Provider.Odbc/Dameng/OdbcDamengDbFirst.cs b/Providers/FreeSql.Provider.Odbc/Dameng/OdbcDamengDbFirst.cs index fe7921cd2..68e2f2a36 100644 --- a/Providers/FreeSql.Provider.Odbc/Dameng/OdbcDamengDbFirst.cs +++ b/Providers/FreeSql.Provider.Odbc/Dameng/OdbcDamengDbFirst.cs @@ -55,7 +55,11 @@ OdbcType GetSqlDbType(DbColumnInfo column) case "char(36)": return OdbcType.Char; } - if (dbfull?.StartsWith("datetime(") == true) return OdbcType.DateTime; + if (dbfull?.StartsWith("datetime(") == true) + { + _dicDbToCs.TryAdd(dbfull, _dicDbToCs["timestamp(6)"]); + return OdbcType.DateTime; + } switch (column.DbTypeText?.ToLower()) { case "bit":