示例#1
0
文件: Settings.cs 项目: vtalas/cms
 public string SettingsStorage(string key, string value)
 {
     var a = Db.ApplicationSettingStorage.SingleOrDefault(x => x.Key == key && x.AppliceSetting.Id == CurrentApplication.Id);
     if (a == null)
     {
         var newsettings = new ApplicationSettingStorage
         {
             Key = key,
             Value = value,
             AppliceSetting = CurrentApplication
         };
         Db.Add(newsettings);
     }
     else
     {
         a.Value = value;
     }
     Db.SaveChanges();
     return value;
 }
示例#2
0
文件: IRepository.cs 项目: vtalas/cms
 public ApplicationSettingStorage Add(ApplicationSettingStorage item)
 {
     throw new NotImplementedException();
 }