From 7b81707e0fa08f4050f6ab41309e0893c30f99dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=97=A0=E5=A5=88=E7=9A=84=E8=B1=AA=E5=B0=8F=E5=85=9C?= Date: Wed, 30 Aug 2023 02:50:43 +0000 Subject: [PATCH] =?UTF-8?q?update=20PetaPoco/Core/DatabaseProvider.cs.=20?= =?UTF-8?q?=E8=BE=BE=E6=A2=A6=E6=95=B0=E6=8D=AE=E5=BA=93=E6=8B=93=E5=B1=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 无奈的豪小兜 --- PetaPoco/Core/DatabaseProvider.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/PetaPoco/Core/DatabaseProvider.cs b/PetaPoco/Core/DatabaseProvider.cs index 858eaed..1f3bfd9 100644 --- a/PetaPoco/Core/DatabaseProvider.cs +++ b/PetaPoco/Core/DatabaseProvider.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Concurrent; using System.Data; using System.Data.Common; @@ -192,6 +192,9 @@ namespace PetaPoco.Core if (typeName.StartsWith("FbConnection") || typeName.EndsWith("FirebirdClientFactory")) return Singleton.Instance; + if (typeName.StartsWith("Dm")) + return Singleton.Instance; + if (typeName.IndexOf("OleDb", StringComparison.InvariantCultureIgnoreCase) >= 0 && (connectionString.IndexOf("Jet.OLEDB", StringComparison.InvariantCultureIgnoreCase) > 0 || connectionString.IndexOf("ACE.OLEDB", StringComparison.InvariantCultureIgnoreCase) > 0)) @@ -255,7 +258,10 @@ namespace PetaPoco.Core if (providerName.IndexOf("Firebird", StringComparison.InvariantCultureIgnoreCase) >= 0 || providerName.IndexOf("FbConnection", StringComparison.InvariantCultureIgnoreCase) >= 0) return Singleton.Instance; - + + if (providerName.StartsWith("Dm")) + return Singleton.Instance; + if (providerName.IndexOf("OleDb", StringComparison.InvariantCultureIgnoreCase) >= 0 && (connectionString.IndexOf("Jet.OLEDB", StringComparison.InvariantCultureIgnoreCase) > 0 || connectionString.IndexOf("ACE.OLEDB", StringComparison.InvariantCultureIgnoreCase) > 0)) -- Gitee