partial void DeleteSetting(Setting instance);
partial void InsertSetting(Setting instance);
partial void UpdateSetting(Setting instance);
private static void SaveStringEnumToDb(string settingName, string[] items, bool commitChanges) { lock (lockSaveStringEnumToDb1) { Setting setting = ctx.Settings.SingleOrDefault(s => s.SettingName == settingName); if (setting == null) { setting = new Setting(); setting.SettingName = settingName; ctx.Settings.InsertOnSubmit(setting); } setting.SettingValue = string.Join(",", items); if (commitChanges) { ctx.SubmitChanges(); } } }