Table of Contents

Interface IReadOnlySequence

Namespace
Microsoft.EntityFrameworkCore.Metadata
Assembly
Microsoft.EntityFrameworkCore.Relational.dll

Represents a database sequence in the model.

public interface IReadOnlySequence : IReadOnlyAnnotatable

Remarks

See Database sequences for more information and examples.

Properties

IncrementBy

Gets the amount incremented to obtain each new value in the sequence.

int IncrementBy { get; }

Property Value

int

IsCyclic

Gets the value indicating whether the sequence will start again from the beginning when the max value is reached.

bool IsCyclic { get; }

Property Value

bool

MaxValue

Gets the maximum value supported by the sequence, or null if none has been set.

long? MaxValue { get; }

Property Value

long?

MinValue

Gets the minimum value supported by the sequence, or null if none has been set.

long? MinValue { get; }

Property Value

long?

Model

Gets the model in which this sequence is defined.

IReadOnlyModel Model { get; }

Property Value

IReadOnlyModel

ModelSchema

Gets the model schema of the sequence. This is the one specified in HasSequence(ModelBuilder, string, string?) and the one to use with FindSequence(IConventionModel, string, string?).

string? ModelSchema { get; }

Property Value

string

Name

Gets the name of the sequence in the database.

string Name { get; }

Property Value

string

Schema

Gets the database schema that contains the sequence.

string? Schema { get; }

Property Value

string

StartValue

Gets the value at which the sequence will start.

long StartValue { get; }

Property Value

long

Type

Gets the type of values returned by the sequence.

Type Type { get; }

Property Value

Type

Methods

ToDebugString(MetadataDebugStringOptions, int)

Creates a human-readable representation of the given metadata.

Warning: Do not rely on the format of the returned string. It is designed for debugging only and may change arbitrarily between releases.

string ToDebugString(MetadataDebugStringOptions options = 0, int indent = 0)

Parameters

options MetadataDebugStringOptions

Options for generating the string.

indent int

The number of indent spaces to use before each new line.

Returns

string

A human-readable representation.