diff --git a/Src/Asp.NetCore2/SqlSeverTest/OscarTest/Config.cs b/Src/Asp.NetCore2/SqlSeverTest/OscarTest/Config.cs
index c8c29c8d8..b68f7ae16 100644
--- a/Src/Asp.NetCore2/SqlSeverTest/OscarTest/Config.cs
+++ b/Src/Asp.NetCore2/SqlSeverTest/OscarTest/Config.cs
@@ -16,16 +16,16 @@ namespace OrmTest
/// Account have permission to create database
/// 用有建库权限的数据库账号
///
- public static string ConnectionString = "PORT=5432;DATABASE=SqlSugar4xTest;HOST=localhost;PASSWORD=haosql;USER ID=postgres";
+ public static string ConnectionString = "PORT=2003;DATABASE=SqlSugar4xTest;HOST=localhost;PASSWORD=szoscar55;USER ID=SYSDBA";
///
/// Account have permission to create database
/// 用有建库权限的数据库账号
///
- public static string ConnectionString2 = "PORT=5432;DATABASE=SqlSugar4xTest2;HOST=localhost;PASSWORD=haosql;USER ID=postgres";
+ public static string ConnectionString2 = "PORT=2003;DATABASE=SqlSugar4xTest2;HOST=localhost;PASSWORD=szoscar55;USER ID=SYSDBA";
///
/// Account have permission to create database
/// 用有建库权限的数据库账号
///
- public static string ConnectionString3 = "PORT=5432;DATABASE=SqlSugar4xTest3;HOST=localhost;PASSWORD=haosql;USER ID=postgres";
+ public static string ConnectionString3 = "PORT=2003;DATABASE=SqlSugar4xTest3;HOST=localhost;PASSWORD=szoscar55;USER ID=SYSDBA";
}
}
diff --git a/Src/Asp.NetCore2/SqlSeverTest/SqlSugar/Abstract/SugarProvider/SqlSugarAccessory.cs b/Src/Asp.NetCore2/SqlSeverTest/SqlSugar/Abstract/SugarProvider/SqlSugarAccessory.cs
index 7bae8f62d..3decc9355 100644
--- a/Src/Asp.NetCore2/SqlSeverTest/SqlSugar/Abstract/SugarProvider/SqlSugarAccessory.cs
+++ b/Src/Asp.NetCore2/SqlSeverTest/SqlSugar/Abstract/SugarProvider/SqlSugarAccessory.cs
@@ -374,6 +374,9 @@ namespace SqlSugar
case DbType.Dm:
DependencyManagement.TryDm();
break;
+ case DbType.Oscar:
+ DependencyManagement.TryOscar();
+ break;
default:
throw new Exception("ConnectionConfig.DbType is null");
}
diff --git a/Src/Asp.NetCore2/SqlSeverTest/SqlSugar/Infrastructure/DependencyManagement.cs b/Src/Asp.NetCore2/SqlSeverTest/SqlSugar/Infrastructure/DependencyManagement.cs
index 8ccda318b..e945e567a 100644
--- a/Src/Asp.NetCore2/SqlSeverTest/SqlSugar/Infrastructure/DependencyManagement.cs
+++ b/Src/Asp.NetCore2/SqlSeverTest/SqlSugar/Infrastructure/DependencyManagement.cs
@@ -15,6 +15,7 @@ namespace SqlSugar
private static bool IsTryPgSql = false;
private static bool IsTryDm = false;
private static bool IsTryKd = false;
+ private static bool IsTryOscar = false;
public static void TryJsonNet()
{
if (!IsTryJsonNet)
@@ -149,5 +150,23 @@ namespace SqlSugar
}
}
}
+
+ public static void TryOscar()
+ {
+ if (!IsTryOscar)
+ {
+ try
+ {
+ OscarProvider db = new OscarProvider();
+ var conn = db.GetAdapter();
+ IsTryOscar = true;
+ }
+ catch (Exception ex)
+ {
+ var message = "需要引用Oscar.Data.SqlClient.dll,Github搜索sqlsugar源码里面有";
+ throw new Exception(message);
+ }
+ }
+ }
}
}
\ No newline at end of file