Dela via


SqlServerPropertyBuilderExtensions.UseSequence Method

Definition

Overloads

UseSequence(PropertyBuilder, String, String)

Configures the key property to use a sequence-based key value generation pattern to generate values for new entities, when targeting SQL Server. This method sets the property to be OnAdd.

UseSequence<TProperty>(PropertyBuilder<TProperty>, String, String)

Configures the key property to use a sequence-based key value generation pattern to generate values for new entities, when targeting SQL Server. This method sets the property to be OnAdd.

UseSequence(PropertyBuilder, String, String)

Source:
SqlServerPropertyBuilderExtensions.cs
Source:
SqlServerPropertyBuilderExtensions.cs
Source:
SqlServerPropertyBuilderExtensions.cs

Configures the key property to use a sequence-based key value generation pattern to generate values for new entities, when targeting SQL Server. This method sets the property to be OnAdd.

public static Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder UseSequence (this Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder, string? name = default, string? schema = default);
static member UseSequence : Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder * string * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder
<Extension()>
Public Function UseSequence (propertyBuilder As PropertyBuilder, Optional name As String = Nothing, Optional schema As String = Nothing) As PropertyBuilder

Parameters

propertyBuilder
PropertyBuilder

The builder for the property being configured.

name
String

The name of the sequence.

schema
String

The schema of the sequence.

Returns

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

Remarks

See Modeling entity types and relationships, and Accessing SQL Server and Azure SQL databases with EF Core for more information and examples.

Applies to

UseSequence<TProperty>(PropertyBuilder<TProperty>, String, String)

Source:
SqlServerPropertyBuilderExtensions.cs
Source:
SqlServerPropertyBuilderExtensions.cs
Source:
SqlServerPropertyBuilderExtensions.cs

Configures the key property to use a sequence-based key value generation pattern to generate values for new entities, when targeting SQL Server. This method sets the property to be OnAdd.

public static Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<TProperty> UseSequence<TProperty> (this Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<TProperty> propertyBuilder, string? name = default, string? schema = default);
static member UseSequence : Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<'Property> * string * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<'Property>
<Extension()>
Public Function UseSequence(Of TProperty) (propertyBuilder As PropertyBuilder(Of TProperty), Optional name As String = Nothing, Optional schema As String = Nothing) As PropertyBuilder(Of TProperty)

Type Parameters

TProperty

The type of the property being configured.

Parameters

propertyBuilder
PropertyBuilder<TProperty>

The builder for the property being configured.

name
String

The name of the sequence.

schema
String

The schema of the sequence.

Returns

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

Remarks

See Modeling entity types and relationships, and Accessing SQL Server and Azure SQL databases with EF Core for more information and examples.

Applies to