SqlServerEntityTypeBuilderExtensions.HasPeriodEnd Method

Definition

Configures a period end property for the entity mapped to a temporal table.

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

Parameters

entityTypeBuilder
IConventionEntityTypeBuilder

The builder for the entity being configured.

propertyName
String

The name of the period end property.

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