|
@@ -51,6 +51,9 @@ namespace Admin.Core
|
|
|
|
|
|
public void ConfigureServices(IServiceCollection services)
|
|
|
{
|
|
|
+
|
|
|
+ services.AddDb(_env, _appConfig);
|
|
|
+
|
|
|
|
|
|
services.AddSingleton(_appConfig);
|
|
|
|
|
@@ -195,9 +198,6 @@ namespace Admin.Core
|
|
|
});
|
|
|
#endregion
|
|
|
|
|
|
-
|
|
|
- services.AddDb(_env,_appConfig);
|
|
|
-
|
|
|
#region 缓存
|
|
|
var cacheConfig = new ConfigHelper().Get<CacheConfig>("cacheconfig", _env.EnvironmentName);
|
|
|
if (cacheConfig.Type == CacheType.Redis)
|