Пример #1
0
        /// <summary>
        ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
        ///     directly from your code. This API may change or be removed in future releases.
        /// </summary>
        public virtual void AddEntityConfigurations()
        {
            foreach (var entityType in Model.GetEntityTypes())
            {
                var entityConfiguration =
                    _configurationFactory.CreateEntityConfiguration(this, entityType);

                AddEntityPropertiesConfiguration(entityConfiguration);
                AddEntityConfiguration(entityConfiguration);
                AddNavigationProperties(entityConfiguration);
                AddNavigationPropertyInitializers(entityConfiguration);
                AddRelationshipConfiguration(entityConfiguration);

                _entityConfigurationMap.Add((EntityType)entityType, entityConfiguration);
            }
        }