EntityTypeBuilder<TEntity>.HasBaseType 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
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
Visszajelzés
https://aka.ms/ContentUserFeedback.
Hamarosan elérhető: 2024-ben fokozatosan kivezetjük a GitHub-problémákat a tartalom visszajelzési mechanizmusaként, és lecseréljük egy új visszajelzési rendszerre. További információ:Visszajelzés küldése és megtekintése a következőhöz: