Share via


SequenceBuilder Class

Definition

Provides a simple API for configuring a ISequence.

public class SequenceBuilder : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionSequenceBuilder
public class SequenceBuilder : Microsoft.EntityFrameworkCore.Infrastructure.IInfrastructure<Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionSequenceBuilder>
type SequenceBuilder = class
    interface IConventionSequenceBuilder
type SequenceBuilder = class
    interface IInfrastructure<IConventionSequenceBuilder>
Public Class SequenceBuilder
Implements IConventionSequenceBuilder
Public Class SequenceBuilder
Implements IInfrastructure(Of IConventionSequenceBuilder)
Inheritance
SequenceBuilder
Implements

Remarks

See Database sequences for more information and examples.

Constructors

SequenceBuilder(IMutableSequence)

Creates a new builder for the given ISequence.

Properties

Metadata

The sequence.

Methods

HasAnnotation(String, Object)

Adds or updates an annotation on the sequence. If an annotation with the key specified in annotation already exists, its value will be updated.

HasMax(Int64)

Sets the maximum value for the ISequence.

HasMin(Int64)

Sets the minimum value for the ISequence.

IncrementsBy(Int32)

Sets the ISequence to increment by the given amount when generating each next value.

IsCyclic(Boolean)

Sets whether or not the sequence will start again from the beginning once the maximum value is reached.

StartsAt(Int64)

Sets the ISequence to start at the given value.

Explicit Interface Implementations

IConventionSequenceBuilder.CanSetCyclic(Nullable<Boolean>, Boolean)

Returns a value indicating whether the given cyclicity can be set for the sequence.

IConventionSequenceBuilder.CanSetIncrementsBy(Nullable<Int32>, Boolean)

Returns a value indicating whether the given increment can be set for the sequence.

IConventionSequenceBuilder.CanSetMax(Nullable<Int64>, Boolean)

Returns a value indicating whether the given maximum value can be set for the sequence.

IConventionSequenceBuilder.CanSetMin(Nullable<Int64>, Boolean)

Returns a value indicating whether the given minimum value can be set for the sequence.

IConventionSequenceBuilder.CanSetStartsAt(Nullable<Int64>, Boolean)

Returns a value indicating whether the given starting value can be set for the sequence.

IConventionSequenceBuilder.CanSetType(Type, Boolean)

Returns a value indicating whether the given type can be set for the sequence.

IConventionSequenceBuilder.HasMax(Nullable<Int64>, Boolean)

Sets the maximum value for the sequence.

IConventionSequenceBuilder.HasMin(Nullable<Int64>, Boolean)

Sets the minimum value for the sequence.

IConventionSequenceBuilder.HasType(Type, Boolean)

Sets the type of values returned by the sequence.

IConventionSequenceBuilder.IncrementsBy(Nullable<Int32>, Boolean)

Sets the sequence to increment by the given amount when generating each next value.

IConventionSequenceBuilder.IsCyclic(Nullable<Boolean>, Boolean)

Sets whether or not the sequence will start again from the beginning once the maximum value is reached.

IConventionSequenceBuilder.Metadata
IConventionSequenceBuilder.StartsAt(Nullable<Int64>, Boolean)

Sets the sequence to start at the given value.

IInfrastructure<IConventionSequenceBuilder>.Instance

Gets the value of the property being hidden.

Extension Methods

GetInfrastructure<T>(IInfrastructure<T>)

Gets the value from a property that is being hidden using IInfrastructure<T>.

This method is typically used by database providers (and other extensions). It is generally not used in application code.

Applies to