Share via


EntityTypeConfiguration<TEntityType>.Map Method

Definition

Overloads

Map(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.

Map<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.

Map(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.

public System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<TEntityType> Map (Action<System.Data.Entity.ModelConfiguration.Configuration.EntityMappingConfiguration<TEntityType>> entityMappingConfigurationAction);
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<TEntityType> Map (Action<System.Data.Entity.ModelConfiguration.Configuration.EntityMappingConfiguration<TEntityType>> entityMappingConfigurationAction);
member this.Map : Action<System.Data.Entity.ModelConfiguration.Configuration.EntityMappingConfiguration<'EntityType>> -> System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<'EntityType (requires 'EntityType : null)>
Public Function Map (entityMappingConfigurationAction As Action(Of EntityMappingConfiguration(Of TEntityType))) As EntityTypeConfiguration(Of TEntityType)

Parameters

entityMappingConfigurationAction
Action<EntityMappingConfiguration<TEntityType>>

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

Returns

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

Attributes

Applies to

Map<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.

public System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<TEntityType> Map<TDerived> (Action<System.Data.Entity.ModelConfiguration.Configuration.EntityMappingConfiguration<TDerived>> derivedTypeMapConfigurationAction) where TDerived : class, TEntityType;
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<TEntityType> Map<TDerived> (Action<System.Data.Entity.ModelConfiguration.Configuration.EntityMappingConfiguration<TDerived>> derivedTypeMapConfigurationAction) where TDerived : class, TEntityType;
member this.Map : Action<System.Data.Entity.ModelConfiguration.Configuration.EntityMappingConfiguration<#'EntityType>> -> System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<'EntityType (requires 'EntityType : null)>
Public Function Map(Of TDerived As {Class, TEntityType}) (derivedTypeMapConfigurationAction As Action(Of EntityMappingConfiguration(Of TDerived))) As EntityTypeConfiguration(Of TEntityType)

Type Parameters

TDerived

The derived entity type to be configured.

Parameters

derivedTypeMapConfigurationAction
Action<EntityMappingConfiguration<TDerived>>

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

Returns

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

Attributes

Applies to