增加Oracle驱动

调整登录时应用判定
This commit is contained in:
yubaolee
2021-04-17 17:06:48 +08:00
parent b061f77495
commit c55ecaff85
10 changed files with 68 additions and 18 deletions

View File

@@ -77,11 +77,16 @@ namespace OpenAuth.IdentityServer
services.AddDbContext<OpenAuthDBContext>(options =>
options.UseSqlServer(Configuration.GetConnectionString("OpenAuthDBContext")));
}
else //mysql
else if(dbType == Define.DBTYPE_MYSQL) //mysql
{
services.AddDbContext<OpenAuthDBContext>(options =>
options.UseMySql(Configuration.GetConnectionString("OpenAuthDBContext")));
}
else //oracle
{
services.AddDbContext<OpenAuthDBContext>(options =>
options.UseOracle(Configuration.GetConnectionString("OpenAuthDBContext")));
}
}