/// <summary> /// Create a new UserSettingData object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="identifier">Initial value of the Identifier property.</param> /// <param name="name">Initial value of the Name property.</param> public static UserSettingData CreateUserSettingData(global::System.Int32 id, global::System.String identifier, global::System.String name) { UserSettingData userSettingData = new UserSettingData(); userSettingData.Id = id; userSettingData.Identifier = identifier; userSettingData.Name = name; return(userSettingData); }
/// <summary> /// Deprecated Method for adding a new object to the UserSettings EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToUserSettings(UserSettingData userSettingData) { base.AddObject("UserSettings", userSettingData); }
/// <summary> /// Create a new UserSettingData object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="identifier">Initial value of the Identifier property.</param> /// <param name="name">Initial value of the Name property.</param> public static UserSettingData CreateUserSettingData(global::System.Int32 id, global::System.String identifier, global::System.String name) { UserSettingData userSettingData = new UserSettingData(); userSettingData.Id = id; userSettingData.Identifier = identifier; userSettingData.Name = name; return userSettingData; }
private static bool AddOrUpdateSetting(SettingsEntities entities, SettingKey key, IProxyType<string> value) { UserSettingData userSetting = entities.GetUserSettingData(key.Identifier, key.Name); if (userSetting == null) { userSetting = new UserSettingData(); userSetting.Identifier = key.Identifier; userSetting.Name = key.Name; entities.UserSettings.AddObject(userSetting); } string valueToPersist = value.ProxiedValue; if (!string.Equals(userSetting.Value, valueToPersist, StringComparison.Ordinal)) { userSetting.Value = valueToPersist; return true; } return false; }
/// <summary> /// Deprecated Method for adding a new object to the UserSettings EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToUserSettings(UserSettingData userSettingData) { base.AddObject("UserSettings", userSettingData); }