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
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
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
Name
Gets the name of the sequence in the database.
string Name { get; }
Property Value
Schema
Gets the database schema that contains the sequence.
string? Schema { get; }
Property Value
StartValue
Gets the value at which the sequence will start.
long StartValue { get; }
Property Value
Type
Gets the type of values returned by the sequence.
Type Type { get; }
Property Value
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
MetadataDebugStringOptionsOptions for generating the string.
indent
intThe number of indent spaces to use before each new line.
Returns
- string
A human-readable representation.