RelationalEntityTypeBuilderExtensions RelationalEntityTypeBuilderExtensions Class

Relational database specific extension methods for EntityTypeBuilder.

Syntax

Declaration

public static class RelationalEntityTypeBuilderExtensionsPublic Module RelationalEntityTypeBuilderExtensions

Inheritance Hierarchy

  • System.Object
    System.Object
  • RelationalEntityTypeBuilderExtensions
    RelationalEntityTypeBuilderExtensions

Inherited Members

ToString(),
ToString(),
Equals(Object),
Equals(Object),
Equals(Object, Object),
Equals(Object, Object),
ReferenceEquals(Object, Object),
ReferenceEquals(Object, Object),
GetHashCode(),
GetHashCode(),
GetType(),
GetType(),
MemberwiseClone()
MemberwiseClone()

Methods summary

Configures the discriminator column used to identify which entity type each row in a table represents when an inheritance hierarchy is mapped to a single table in a relational database.

Configures the discriminator column used to identify which entity type each row in a table represents when an inheritance hierarchy is mapped to a single table in a relational database.

Configures the discriminator column used to identify which entity type each row in a table represents when an inheritance hierarchy is mapped to a single table in a relational database.

Configures the discriminator column used to identify which entity type each row in a table represents when an inheritance hierarchy is mapped to a single table in a relational database.

Configures the table that the entity maps to when targeting a relational database.

Configures the table that the entity maps to when targeting a relational database.

Configures the table that the entity maps to when targeting a relational database.

Configures the table that the entity maps to when targeting a relational database.

Methods

  • HasDiscriminator(EntityTypeBuilder)
    HasDiscriminator(EntityTypeBuilder)

    Configures the discriminator column used to identify which entity type each row in a table represents when an inheritance hierarchy is mapped to a single table in a relational database.

    public static DiscriminatorBuilder HasDiscriminator(this EntityTypeBuilder entityTypeBuilder)<ExtensionAttribute>
    Public Shared Function HasDiscriminator(entityTypeBuilder As EntityTypeBuilder) As DiscriminatorBuilder

    Parameters

    Returns

  • HasDiscriminator(EntityTypeBuilder, String, Type)
    HasDiscriminator(EntityTypeBuilder, String, Type)

    Configures the discriminator column used to identify which entity type each row in a table represents when an inheritance hierarchy is mapped to a single table in a relational database.

    public static DiscriminatorBuilder HasDiscriminator(this EntityTypeBuilder entityTypeBuilder, string name, Type discriminatorType)<ExtensionAttribute>
    Public Shared Function HasDiscriminator(entityTypeBuilder As EntityTypeBuilder, name As String, discriminatorType As Type) As DiscriminatorBuilder

    Parameters

    • entityTypeBuilder

      The builder for the entity type being configured.

    • name
      System.String
      System.String

      The name of the discriminator column.

    • discriminatorType
      System.Type
      System.Type

      The type of values stored in the discriminator column.

    Returns

  • HasDiscriminator<TDiscriminator>(EntityTypeBuilder, String)
    HasDiscriminator(Of TDiscriminator)(EntityTypeBuilder, String)

    Configures the discriminator column used to identify which entity type each row in a table represents when an inheritance hierarchy is mapped to a single table in a relational database.

    public static DiscriminatorBuilder<TDiscriminator> HasDiscriminator<TDiscriminator>(this EntityTypeBuilder entityTypeBuilder, string name)<ExtensionAttribute>
    Public Shared Function HasDiscriminator(Of TDiscriminator)(entityTypeBuilder As EntityTypeBuilder, name As String) As DiscriminatorBuilder(Of TDiscriminator)

    Parameters

    • entityTypeBuilder

      The builder for the entity type being configured.

    • name
      System.String
      System.String

      The name of the discriminator column.

    Returns

  • HasDiscriminator<TEntity, TDiscriminator>(EntityTypeBuilder<TEntity>, Expression<Func<TEntity, TDiscriminator>>)
    HasDiscriminator(Of TEntity, TDiscriminator)(EntityTypeBuilder(Of TEntity), Expression(Of Func(Of TEntity, TDiscriminator)))

    Configures the discriminator column used to identify which entity type each row in a table represents when an inheritance hierarchy is mapped to a single table in a relational database.

    public static DiscriminatorBuilder<TDiscriminator> HasDiscriminator<TEntity, TDiscriminator>(this EntityTypeBuilder<TEntity> entityTypeBuilder, Expression<Func<TEntity, TDiscriminator>> propertyExpression)where TEntity : class<ExtensionAttribute>
    Public Shared Function HasDiscriminator(Of TEntity As Class, TDiscriminator)(entityTypeBuilder As EntityTypeBuilder(Of TEntity), propertyExpression As Expression(Of Func(Of TEntity, TDiscriminator))) As DiscriminatorBuilder(Of TDiscriminator)

    Parameters

    • entityTypeBuilder

      The builder for the entity type being configured.

    • propertyExpression
      System.Linq.Expressions.Expression<TDelegate><System.Func<T, TResult><TEntity, TDiscriminator>>
      System.Linq.Expressions.Expression<TDelegate>(Of System.Func<T, TResult>(Of TEntity, TDiscriminator))

      A lambda expression representing the property to be used as the discriminator ( blog => blog.Discriminator).

    Returns

  • ToTable(EntityTypeBuilder, String)
    ToTable(EntityTypeBuilder, String)

    Configures the table that the entity maps to when targeting a relational database.

    public static EntityTypeBuilder ToTable(this EntityTypeBuilder entityTypeBuilder, string name)<ExtensionAttribute>
    Public Shared Function ToTable(entityTypeBuilder As EntityTypeBuilder, name As String) As EntityTypeBuilder

    Parameters

    Returns

  • ToTable(EntityTypeBuilder, String, String)
    ToTable(EntityTypeBuilder, String, String)

    Configures the table that the entity maps to when targeting a relational database.

    public static EntityTypeBuilder ToTable(this EntityTypeBuilder entityTypeBuilder, string name, string schema)<ExtensionAttribute>
    Public Shared Function ToTable(entityTypeBuilder As EntityTypeBuilder, name As String, schema As String) As EntityTypeBuilder

    Parameters

    • entityTypeBuilder

      The builder for the entity type being configured.

    • name
      System.String
      System.String

      The name of the table.

    • schema
      System.String
      System.String

      The schema of the table.

    Returns

  • ToTable<TEntity>(EntityTypeBuilder<TEntity>, String)
    ToTable(Of TEntity)(EntityTypeBuilder(Of TEntity), String)

    Configures the table that the entity maps to when targeting a relational database.

    public static EntityTypeBuilder<TEntity> ToTable<TEntity>(this EntityTypeBuilder<TEntity> entityTypeBuilder, string name)where TEntity : class<ExtensionAttribute>
    Public Shared Function ToTable(Of TEntity As Class)(entityTypeBuilder As EntityTypeBuilder(Of TEntity), name As String) As EntityTypeBuilder(Of TEntity)

    Parameters

    Returns

  • ToTable<TEntity>(EntityTypeBuilder<TEntity>, String, String)
    ToTable(Of TEntity)(EntityTypeBuilder(Of TEntity), String, String)

    Configures the table that the entity maps to when targeting a relational database.

    public static EntityTypeBuilder<TEntity> ToTable<TEntity>(this EntityTypeBuilder<TEntity> entityTypeBuilder, string name, string schema)where TEntity : class<ExtensionAttribute>
    Public Shared Function ToTable(Of TEntity As Class)(entityTypeBuilder As EntityTypeBuilder(Of TEntity), name As String, schema As String) As EntityTypeBuilder(Of TEntity)

    Parameters

    • entityTypeBuilder

      The builder for the entity type being configured.

    • name
      System.String
      System.String

      The name of the table.

    • schema
      System.String
      System.String

      The schema of the table.

    Returns

Details

Assembly

Microsoft.EntityFrameworkCore.Relational.dll