EntityTypeConfiguration<TEntityType>.Map Method

 

Namespace:   System.Data.Entity.ModelConfiguration
Assembly:  EntityFramework (in EntityFramework.dll)

NameDescription
System_CAPS_pubmethodMap(Action<EntityMappingConfiguration<TEntityType>>)

Allows advanced configuration related to how this entity type is mapped to the database schema. By default, any configuration will also apply to any type derived from this entity type. Derived types can be configured via the overload of Map that configures a derived type or by using an EntityTypeConfiguration for the derived type. The properties of an entity can be split between multiple tables using multiple Map calls. Calls to Map are additive, subsequent calls will not override configuration already preformed via Map.

System_CAPS_pubmethodMap<TDerived>(Action<EntityMappingConfiguration<TDerived>>)

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.


EntityTypeConfiguration<TEntityType>.Map Method (Action<EntityMappingConfiguration<TEntityType>>)

Allows advanced configuration related to how this entity type is mapped to the database schema. By default, any configuration will also apply to any type derived from this entity type. Derived types can be configured via the overload of Map that configures a derived type or by using an EntityTypeConfiguration for the derived type. The properties of an entity can be split between multiple tables using multiple Map calls. Calls to Map are additive, subsequent calls will not override configuration already preformed via Map.

[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public EntityTypeConfiguration<TEntityType> Map(
	Action<EntityMappingConfiguration<TEntityType>> entityMappingConfigurationAction
)

Parameters

entityMappingConfigurationAction
Type: System.Action<EntityMappingConfiguration<TEntityType>>

An action that performs configuration against an EntityMappingConfiguration<TEntityType> .

Return Value

Type: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<TEntityType>

The same EntityTypeConfiguration instance so that multiple calls can be chained.


EntityTypeConfiguration<TEntityType>.Map<TDerived> Method (Action<EntityMappingConfiguration<TDerived>>)

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.

[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public EntityTypeConfiguration<TEntityType> Map<TDerived>(
	Action<EntityMappingConfiguration<TDerived>> derivedTypeMapConfigurationAction
)
where TDerived : class, TEntityType

Parameters

derivedTypeMapConfigurationAction
Type: System.Action<EntityMappingConfiguration<TDerived>>

An action that performs configuration against an EntityMappingConfiguration<TEntityType> .

Return Value

Type: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<TEntityType>

The same EntityTypeConfiguration instance so that multiple calls can be chained.

Type Parameters

TDerived

The derived entity type to be configured.