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; }
public ApplicationSettingStorage Add(ApplicationSettingStorage item) { throw new NotImplementedException(); }