SqlServerEntityTypeBuilderExtensions.UseHistoryTableSchema Method

Definition

Configures a history table schema for the entity mapped to a temporal table.

public static Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder? UseHistoryTableSchema (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder entityTypeBuilder, string? schema, bool fromDataAnnotation = false);
static member UseHistoryTableSchema : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder * string * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder
<Extension()>
Public Function UseHistoryTableSchema (entityTypeBuilder As IConventionEntityTypeBuilder, schema As String, Optional fromDataAnnotation As Boolean = false) As IConventionEntityTypeBuilder

Parameters

entityTypeBuilder
IConventionEntityTypeBuilder

The builder for the entity being configured.

schema
String

The schema of the history table.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The same builder instance if the configuration was applied, null otherwise.

Remarks

See Using SQL Server temporal tables with EF Core for more information and examples.

Applies to