mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-20 02:29:24 +08:00
同步OpenAuth.Core,单元测试使用WebApi配置文件
This commit is contained in:
@@ -92,16 +92,7 @@ namespace OpenAuth.Mvc
|
||||
var connectionString = Configuration.GetConnectionString("OpenAuthDBContext");
|
||||
logger.LogInformation($"当前数据库类型:{dbType},连接字符串:{connectionString}");
|
||||
|
||||
if (dbType == Define.DBTYPE_SQLSERVER)
|
||||
{
|
||||
services.AddDbContext<OpenAuthDBContext>(options =>
|
||||
options.UseSqlServer(connectionString));
|
||||
}
|
||||
else //mysql
|
||||
{
|
||||
services.AddDbContext<OpenAuthDBContext>(options =>
|
||||
options.UseMySql(connectionString));
|
||||
}
|
||||
services.AddDbContext<OpenAuthDBContext>();
|
||||
|
||||
services.AddHttpClient();
|
||||
|
||||
|
Reference in New Issue
Block a user