예제 #1
0
 /// <summary>
 /// 初始化数据库
 /// </summary>
 /// <param name="dbContext"></param>
 /// <returns></returns>
 private IDictionary <string, string> Initialize(ApplicationSettingsContext dbContext)
 {
     foreach (var item in _initialSettings)
     {
         dbContext.Settings.Add(new ApplicationSetting(item.Key, item.Value));
     }
     dbContext.SaveChanges();
     return(_initialSettings.ToDictionary(it => it.Key, it => it.Value, StringComparer.OrdinalIgnoreCase));
 }