mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-07-15 14:04:44 +08:00
Support custom database
This commit is contained in:
parent
2eb902b6a8
commit
f4092607c9
@ -14,6 +14,9 @@ namespace SqlSugar
|
||||
PostgreSQL,
|
||||
Dm,
|
||||
Kdbndp,
|
||||
Oscar
|
||||
Oscar,
|
||||
MySqlConnector,
|
||||
Access,
|
||||
Custom=900
|
||||
}
|
||||
}
|
||||
|
@ -25,13 +25,25 @@ namespace SqlSugar
|
||||
{
|
||||
return new SqlServerQueryable<T>();
|
||||
}
|
||||
else if (currentConnectionConfig.DbType == DbType.MySql)
|
||||
else if (currentConnectionConfig.DbType == DbType.MySql)
|
||||
{
|
||||
return new MySqlQueryable<T>();
|
||||
}
|
||||
else if (currentConnectionConfig.DbType == DbType.PostgreSQL)
|
||||
{
|
||||
return new PostgreSQLQueryable<T>();
|
||||
}
|
||||
else if (currentConnectionConfig.DbType == DbType.MySqlConnector)
|
||||
{
|
||||
return CustomProvider.GetQueryable<T>("MySql", "SqlSugar.MySqlConnector");
|
||||
}
|
||||
else if (currentConnectionConfig.DbType == DbType.Access)
|
||||
{
|
||||
return CustomProvider.GetQueryable<T>("MySql", "SqlSugar.Access");
|
||||
}
|
||||
else if (currentConnectionConfig.DbType == DbType.Custom)
|
||||
{
|
||||
return CustomProvider.GetQueryable<T>("DbType.Custom", "DbType.Custom");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
16
Src/Asp.Net/SqlSugar/Realization/Custom/CustomProvider.cs
Normal file
16
Src/Asp.Net/SqlSugar/Realization/Custom/CustomProvider.cs
Normal file
@ -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<T> GetQueryable<T>(string dbName, string dllName)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
@ -102,6 +102,7 @@
|
||||
<Compile Include="Interface\IFastBuilder.cs" />
|
||||
<Compile Include="Interface\IFastest.cs" />
|
||||
<Compile Include="OnlyNet\OracleFastBuilder.cs" />
|
||||
<Compile Include="Realization\Custom\CustomProvider.cs" />
|
||||
<Compile Include="Realization\MySql\SqlBuilder\MySqlFastBuilder.cs" />
|
||||
<Compile Include="Realization\PostgreSQL\SqlBuilder\PostgreSQLFastBuilder.cs" />
|
||||
<Compile Include="Realization\Sqlite\SqlBuilder\SqliteFastBuilder.cs" />
|
||||
|
Loading…
Reference in New Issue
Block a user