diff --git a/Src/Asp.Net/SqlSugar/Enum/DbType.cs b/Src/Asp.Net/SqlSugar/Enum/DbType.cs index bac17890e..b69d5140e 100644 --- a/Src/Asp.Net/SqlSugar/Enum/DbType.cs +++ b/Src/Asp.Net/SqlSugar/Enum/DbType.cs @@ -14,6 +14,9 @@ namespace SqlSugar PostgreSQL, Dm, Kdbndp, - Oscar + Oscar, + MySqlConnector, + Access, + Custom=900 } } diff --git a/Src/Asp.Net/SqlSugar/Infrastructure/InstanceFactory.cs b/Src/Asp.Net/SqlSugar/Infrastructure/InstanceFactory.cs index 049b07468..ca1a45f2a 100644 --- a/Src/Asp.Net/SqlSugar/Infrastructure/InstanceFactory.cs +++ b/Src/Asp.Net/SqlSugar/Infrastructure/InstanceFactory.cs @@ -25,13 +25,25 @@ namespace SqlSugar { return new SqlServerQueryable(); } - else if (currentConnectionConfig.DbType == DbType.MySql) + else if (currentConnectionConfig.DbType == DbType.MySql) { return new MySqlQueryable(); } else if (currentConnectionConfig.DbType == DbType.PostgreSQL) { return new PostgreSQLQueryable(); + } + else if (currentConnectionConfig.DbType == DbType.MySqlConnector) + { + return CustomProvider.GetQueryable("MySql", "SqlSugar.MySqlConnector"); + } + else if (currentConnectionConfig.DbType == DbType.Access) + { + return CustomProvider.GetQueryable("MySql", "SqlSugar.Access"); + } + else if (currentConnectionConfig.DbType == DbType.Custom) + { + return CustomProvider.GetQueryable("DbType.Custom", "DbType.Custom"); } else { diff --git a/Src/Asp.Net/SqlSugar/Realization/Custom/CustomProvider.cs b/Src/Asp.Net/SqlSugar/Realization/Custom/CustomProvider.cs new file mode 100644 index 000000000..08a0aadc7 --- /dev/null +++ b/Src/Asp.Net/SqlSugar/Realization/Custom/CustomProvider.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SqlSugar +{ + public class CustomProvider + { + internal static ISugarQueryable GetQueryable(string dbName, string dllName) + { + throw new NotImplementedException(); + } + } +} diff --git a/Src/Asp.Net/SqlSugar/SqlSugar.csproj b/Src/Asp.Net/SqlSugar/SqlSugar.csproj index 8786263da..4cac9d910 100644 --- a/Src/Asp.Net/SqlSugar/SqlSugar.csproj +++ b/Src/Asp.Net/SqlSugar/SqlSugar.csproj @@ -102,6 +102,7 @@ +