From a1025515882a24bedffd3214c3b959fb03fe60a6 Mon Sep 17 00:00:00 2001 From: Tyler Watson Date: Fri, 14 Apr 2017 17:33:48 +1000 Subject: [PATCH] System.Data.SQLite.Core support in GetSqlType() GetSqlType() does not recognise System.Data.SQLite.Core because the type of the SQL connection class has been renamed to `SQLiteConnection` from `SqliteConnection`. This commit adds support for both, so that the DB manager classes can operate with plugins which reference the new SQLite ADO.net providers from NuGet. --- TShockAPI/Extensions/DbExt.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TShockAPI/Extensions/DbExt.cs b/TShockAPI/Extensions/DbExt.cs index 1da61a57..3db75ec6 100644 --- a/TShockAPI/Extensions/DbExt.cs +++ b/TShockAPI/Extensions/DbExt.cs @@ -111,7 +111,7 @@ namespace TShockAPI.DB public static SqlType GetSqlType(this IDbConnection conn) { var name = conn.GetType().Name; - if (name == "SqliteConnection") + if (name == "SqliteConnection" || name == "SQLiteConnection") return SqlType.Sqlite; if (name == "MySqlConnection") return SqlType.Mysql;