/// <summary>
 /// Veraltete Methode zum Hinzufügen eines neuen Objekts zum EntitySet 'ActivationMethods'. Verwenden Sie stattdessen die Methode '.Add' der zugeordneten Eigenschaft 'ObjectSet&lt;T&gt;'.
 /// </summary>
 public void AddToActivationMethods(ActivationMethod activationMethod)
 {
     base.AddObject("ActivationMethods", activationMethod);
 }
 /// <summary>
 /// Erstellt ein neues ActivationMethod-Objekt.
 /// </summary>
 /// <param name="id">Anfangswert der Eigenschaft Id.</param>
 public static ActivationMethod CreateActivationMethod(global::System.Int32 id)
 {
     ActivationMethod activationMethod = new ActivationMethod();
     activationMethod.Id = id;
     return activationMethod;
 }
        protected void PreProcessActivationMethods()
        {
            List<string> distinctMsgActivationMethods = (from s in message.Sessions
                                                         from fu in s.FeatureUses
                                                         select fu.ActivationMethod ?? string.Empty).Distinct().ToList();

            if (distinctMsgActivationMethods.Count > 0)
            {
                List<string> knownActivationMethods = ImportCache.GetActivationMethodNames(repository);
                List<string> missing = distinctMsgActivationMethods.Except(knownActivationMethods).ToList();

                if (missing.Count > 0)
                {
                    foreach (string am in missing)
                    {
                        ActivationMethod modelAM = new ActivationMethod()
                        {
                            Name = am
                        };

                        repository.Context.ActivationMethods.AddObject(modelAM);
                    }

                    repository.IgnoreDuplicateKeysOnSaveChanges<ActivationMethod>();
                    ImportCache.InvalidateActivationMethodsCaches();
                }
            }
        }