EntityTypeBuilder<TEntity>.HasBaseType Method

Definition

Overloads

HasBaseType(Type)

Sets the base type of this entity type in an inheritance hierarchy.

HasBaseType(String)

Sets the base type of this entity type in an inheritance hierarchy.

HasBaseType<TBaseType>()

Sets the base type of this entity type in an inheritance hierarchy.

HasBaseType(Type)

Sets the base type of this entity type in an inheritance hierarchy.

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<TEntity> HasBaseType (Type entityType);
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<TEntity> HasBaseType (Type? entityType);
override this.HasBaseType : Type -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<'Entity (requires 'Entity : null)>
Public Overridable Function HasBaseType (entityType As Type) As EntityTypeBuilder(Of TEntity)

Parameters

entityType
Type

The base type or null to indicate no base type.

Returns

The same builder instance so that multiple configuration calls can be chained.

Applies to

HasBaseType(String)

Sets the base type of this entity type in an inheritance hierarchy.

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<TEntity> HasBaseType (string name);
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<TEntity> HasBaseType (string? name);
override this.HasBaseType : string -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<'Entity (requires 'Entity : null)>
Public Overridable Function HasBaseType (name As String) As EntityTypeBuilder(Of TEntity)

Parameters

name
String

The name of the base type or null to indicate no base type.

Returns

The same builder instance so that multiple configuration calls can be chained.

Applies to

HasBaseType<TBaseType>()

Sets the base type of this entity type in an inheritance hierarchy.

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<TEntity> HasBaseType<TBaseType> ();
override this.HasBaseType : unit -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<'Entity (requires 'Entity : null)>
Public Overridable Function HasBaseType(Of TBaseType) () As EntityTypeBuilder(Of TEntity)

Type Parameters

TBaseType

The base type or null to indicate no base type.

Returns

The same builder instance so that multiple configuration calls can be chained.

Applies to