/// <summary>
 /// Veraltete Methode zum Hinzufügen eines neuen Objekts zum EntitySet 'EnvironmentDataValues'. Verwenden Sie stattdessen die Methode '.Add' der zugeordneten Eigenschaft 'ObjectSet&lt;T&gt;'.
 /// </summary>
 public void AddToEnvironmentDataValues(EnvironmentDataValue environmentDataValue)
 {
     base.AddObject("EnvironmentDataValues", environmentDataValue);
 }
 /// <summary>
 /// Erstellt ein neues EnvironmentDataValue-Objekt.
 /// </summary>
 /// <param name="id">Anfangswert der Eigenschaft Id.</param>
 public static EnvironmentDataValue CreateEnvironmentDataValue(global::System.Int32 id)
 {
     EnvironmentDataValue environmentDataValue = new EnvironmentDataValue();
     environmentDataValue.Id = id;
     return environmentDataValue;
 }
        protected void PreProcessEnvironmentDataValues()
        {
            List<string> distinctMsgEnvValues = (from s in message.Sessions
                                                   from p in s.EnvironmentProperties
                                                   select p.Value).Distinct().ToList();

            if (distinctMsgEnvValues.Count > 0)
            {
                List<string> knownDataValueNames = ImportCache.GetEnvironmentDataValueNames(repository);
                List<string> missing = distinctMsgEnvValues.Except(knownDataValueNames).ToList();

                if (missing.Count > 0)
                {
                    foreach (string vn in missing)
                    {
                        EnvironmentDataValue modelValue = new EnvironmentDataValue()
                        {
                            Name = vn
                        };

                        repository.Context.EnvironmentDataValues.AddObject(modelValue);
                    }

                    repository.IgnoreDuplicateKeysOnSaveChanges<EnvironmentDataValue>();
                    ImportCache.InvalidateEnvironmentDataValueCaches();
                }
            }
        }