public static void Set(UmbracoObjectTypes objectType, string alias, ObjectTypeConfiguration typeConfiguration)
 {
     lock (LockObj)
     {
         var existing = ObjectTypes.FirstOrDefault(t => t.Name == objectType && t.Alias == alias);
         if (existing != null)
         {
             configuration.ObjectTypes.Remove(existing);
         }
         if (typeConfiguration.EnabledRelations.Any())
         {
             typeConfiguration.Alias = alias;
             typeConfiguration.Name  = objectType;
             configuration.ObjectTypes.Add(typeConfiguration);
         }
         Save();
     }
 }
 public static void Set(UmbracoObjectTypes objectType, string alias, ObjectTypeConfiguration typeConfiguration)
 {
     lock (LockObj)
     {
         var existing = ObjectTypes.FirstOrDefault(t => t.Name == objectType && t.Alias == alias);
         if (existing != null)
             configuration.ObjectTypes.Remove(existing);
         if (typeConfiguration.EnabledRelations.Any())
         { 
             typeConfiguration.Alias = alias;
             typeConfiguration.Name = objectType;
             configuration.ObjectTypes.Add(typeConfiguration);
         }
         Save();
     }
 }