src/Shared/EntityFramework/ModelConfiguration/EntityTypeConfiguration.cs
/// <summary>
/// Allows advanced configuration related to how a derived entity type is mapped to the database schema.
/// Calls to Map are additive, subsequent calls will not override configuration already preformed via Map.
/// </summary>
/// <typeparam name="TDerived"> The derived entity type to be configured. </typeparam>
/// <param name="derivedTypeMapConfigurationAction">
/// An action that performs configuration against an
/// <see
///     cref="EntityMappingConfiguration{TEntityType}" />
/// .
/// </param>
/// <returns> The same EntityTypeConfiguration instance so that multiple calls can be chained. </returns>
Allows advanced configuration related to how a derived entity type is mapped to the database schema.
Calls to Map are additive, subsequent calls will not override configuration already preformed via Map.
Allows advanced configuration related to how a derived entity type is mapped to the database schema . Calls to Map are additive subsequent calls will not override configuration already preformed via Map .
[SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
        public EntityTypeConfiguration<TEntityType> Map<TDerived>(
            Action<EntityMappingConfiguration<TDerived>> derivedTypeMapConfigurationAction)
            where TDerived : class, TEntityType
        {
            Check.NotNull(derivedTypeMapConfigurationAction, "derivedTypeMapConfigurationAction");
            var entityMappingConfiguration = new EntityMappingConfiguration<TDerived>();
            var tableName = _entityTypeConfiguration.GetTableName();
            if (tableName != null)
            {
                entityMappingConfiguration.EntityMappingConfigurationInstance.TableName = tableName;
            }
            derivedTypeMapConfigurationAction(entityMappingConfiguration);
            if (typeof(TDerived)
                == typeof(TEntityType))
            {
                _entityTypeConfiguration.AddMappingConfiguration(
                    entityMappingConfiguration.EntityMappingConfigurationInstance);
            }
            else
            {
                _entityTypeConfiguration
                    .AddSubTypeMappingConfiguration(
                        typeof(TDerived), entityMappingConfiguration.EntityMappingConfigurationInstance);
            }
            return this;
        }
[ SuppressMessage ( " " , " " ) ] public EntityTypeConfiguration < TEntityType > Map < TDerived > ( Action < EntityMappingConfiguration < TDerived > > derivedTypeMapConfigurationAction ) where TDerived : class , TEntityType { Check . NotNull ( derivedTypeMapConfigurationAction , " " ) ; var entityMappingConfiguration = new EntityMappingConfiguration < TDerived > ( ) ; var tableName = _entityTypeConfiguration . GetTableName ( ) ; if ( tableName != null ) { entityMappingConfiguration . EntityMappingConfigurationInstance . TableName = tableName ; } derivedTypeMapConfigurationAction ( entityMappingConfiguration ) ; if ( typeof ( TDerived ) == typeof ( TEntityType ) ) { _entityTypeConfiguration . AddMappingConfiguration ( entityMappingConfiguration . EntityMappingConfigurationInstance ) ; } else { _entityTypeConfiguration . AddSubTypeMappingConfiguration ( typeof ( TDerived ) , entityMappingConfiguration . EntityMappingConfigurationInstance ) ; } return this ; }
Allows advanced configuration related to how a derived entity type is mapped to the database schema.
Allows advanced configuration related to how a derived entity type is mapped to the database schema .
The same EntityTypeConfiguration instance so that multiple calls can be chained.
The same EntityTypeConfiguration instance so that multiple calls can be chained .
derivedTypeMapConfigurationAction
Action<EntityMappingConfiguration<TDerived>>
An action that performs configuration against an


An action that performs configuration against an
typeparam
The derived entity type to be configured.
The derived entity type to be configured .