Пример #1
0
        private void ThrowIfConflictingKeyMappingSettingExists(EntityKeyMappingSetting setting)
        {
            if ((_entityKeyMappingSettings == null) && !setting.MapKeys)
            {
                throw new MappingConfigurationException("Entity key mapping is disabled by default");
            }

            ThrowIfConflictingItemExists(
                setting,
                _entityKeyMappingSettings,
                (s, conflicting) => conflicting.GetConflictMessage(s));
        }
Пример #2
0
        public void Add(EntityKeyMappingSetting setting)
        {
            ThrowIfConflictingKeyMappingSettingExists(setting);

            EntityKeyMappingSettings.AddThenSort(setting);
        }