重构代码:根据最新的Longbow.Data增加IConfiguration参数

This commit is contained in:
Argo-MacBookPro 2018-10-25 09:16:07 +08:00
parent ee872a7b1c
commit 6c051f1d49
2 changed files with 2 additions and 2 deletions

View File

@ -61,7 +61,7 @@ namespace Bootstrap.Admin
services.AddLogging(builder => builder.AddFileLogger().AddDBLogger(ExceptionsHelper.Log));
services.AddConfigurationManager(Configuration);
services.AddCacheManager(Configuration);
services.AddDbAdapter(() => { CacheManager.Clear(); CacheManager.CorsClear(new List<string>() { "*" }); });
services.AddDbAdapter(Configuration, () => { CacheManager.Clear(); CacheManager.CorsClear(new List<string>() { "*" }); });
var dataProtectionBuilder = services.AddDataProtection(op => op.ApplicationDiscriminator = Configuration["ApplicationDiscriminator"])
.SetApplicationName(Configuration["ApplicationName"])
.PersistKeysToFileSystem(new DirectoryInfo(Configuration["KeyPath"]));

View File

@ -46,7 +46,7 @@ namespace Bootstrap.Client
services.AddLogging(builder => builder.AddFileLogger());
services.AddConfigurationManager(Configuration);
services.AddCacheManager(Configuration);
services.AddDbAdapter();
services.AddDbAdapter(Configuration);
var dataProtectionBuilder = services.AddDataProtection(op => op.ApplicationDiscriminator = Configuration["ApplicationDiscriminator"])
.SetApplicationName(Configuration["ApplicationName"])
.PersistKeysToFileSystem(new DirectoryInfo(Configuration["KeyPath"]));