RelationalEntityTypeBuilderExtensions.UseTphMappingStrategy Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
UseTphMappingStrategy(EntityTypeBuilder) |
Configures TPH as the mapping strategy for the derived types. All types will be mapped to the same database object. This is the default mapping strategy. |
UseTphMappingStrategy<TEntity>(EntityTypeBuilder<TEntity>) |
Configures TPH as the mapping strategy for the derived types. All types will be mapped to the same database object. This is the default mapping strategy. |
UseTphMappingStrategy(EntityTypeBuilder)
Configures TPH as the mapping strategy for the derived types. All types will be mapped to the same database object. This is the default mapping strategy.
public static Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder UseTphMappingStrategy (this Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder entityTypeBuilder);
static member UseTphMappingStrategy : Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
<Extension()>
Public Function UseTphMappingStrategy (entityTypeBuilder As EntityTypeBuilder) As EntityTypeBuilder
Parameters
- entityTypeBuilder
- EntityTypeBuilder
The builder for the entity type being configured.
Returns
The same builder instance so that multiple calls can be chained.
Remarks
See Entity type hierarchy mapping for more information and examples.
Applies to
UseTphMappingStrategy<TEntity>(EntityTypeBuilder<TEntity>)
Configures TPH as the mapping strategy for the derived types. All types will be mapped to the same database object. This is the default mapping strategy.
public static Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<TEntity> UseTphMappingStrategy<TEntity> (this Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<TEntity> entityTypeBuilder) where TEntity : class;
static member UseTphMappingStrategy : Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<'Entity (requires 'Entity : null)> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<'Entity (requires 'Entity : null)> (requires 'Entity : null)
<Extension()>
Public Function UseTphMappingStrategy(Of TEntity As Class) (entityTypeBuilder As EntityTypeBuilder(Of TEntity)) As EntityTypeBuilder(Of TEntity)
Type Parameters
- TEntity
Parameters
- entityTypeBuilder
- EntityTypeBuilder<TEntity>
The builder for the entity type being configured.
Returns
The same builder instance so that multiple calls can be chained.
Remarks
See Entity type hierarchy mapping for more information and examples.
Applies to
Entity Framework