Interface IConventionSequenceBuilder
- Namespace
- Microsoft.EntityFrameworkCore.Metadata.Builders
- Assembly
- Microsoft.EntityFrameworkCore.Relational.dll
Provides a simple API for configuring a IConventionSequence.
public interface IConventionSequenceBuilder : IConventionAnnotatableBuilder
Properties
Metadata
The sequence being configured.
IConventionSequence Metadata { get; }
Property Value
Methods
CanSetIncrementsBy(int?, bool)
Returns a value indicating whether the given increment can be set for the sequence.
bool CanSetIncrementsBy(int? increment, bool fromDataAnnotation = false)
Parameters
increment
int?The amount to increment between values.
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
CanSetIsCyclic(bool?, bool)
Returns a value indicating whether the given cyclicity can be set for the sequence.
bool CanSetIsCyclic(bool? cyclic, bool fromDataAnnotation = false)
Parameters
cyclic
bool?If true, then the sequence with restart when the maximum is reached.
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
CanSetMax(long?, bool)
Returns a value indicating whether the given maximum value can be set for the sequence.
bool CanSetMax(long? maximum, bool fromDataAnnotation = false)
Parameters
maximum
long?The maximum value for the sequence.
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
CanSetMin(long?, bool)
Returns a value indicating whether the given minimum value can be set for the sequence.
bool CanSetMin(long? minimum, bool fromDataAnnotation = false)
Parameters
minimum
long?The minimum value for the sequence.
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
CanSetStartsAt(long?, bool)
Returns a value indicating whether the given starting value can be set for the sequence.
bool CanSetStartsAt(long? startValue, bool fromDataAnnotation = false)
Parameters
startValue
long?The starting value for the sequence.
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
CanSetType(Type, bool)
Returns a value indicating whether the given type can be set for the sequence.
bool CanSetType(Type type, bool fromDataAnnotation = false)
Parameters
type
TypeThe type of values returned by the sequence.
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
HasMax(long?, bool)
Sets the maximum value for the sequence.
IConventionSequenceBuilder HasMax(long? maximum, bool fromDataAnnotation = false)
Parameters
maximum
long?The maximum value for the sequence.
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
- IConventionSequenceBuilder
The same builder instance if the configuration was applied, null otherwise.
HasMin(long?, bool)
Sets the minimum value for the sequence.
IConventionSequenceBuilder HasMin(long? minimum, bool fromDataAnnotation = false)
Parameters
minimum
long?The minimum value for the sequence.
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
- IConventionSequenceBuilder
The same builder instance if the configuration was applied, null otherwise.
HasType(Type, bool)
Sets the type of values returned by the sequence.
IConventionSequenceBuilder HasType(Type type, bool fromDataAnnotation = false)
Parameters
type
TypeThe type of values returned by the sequence.
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
- IConventionSequenceBuilder
The same builder instance if the configuration was applied, null otherwise.
IncrementsBy(int?, bool)
Sets the sequence to increment by the given amount when generating each next value.
IConventionSequenceBuilder IncrementsBy(int? increment, bool fromDataAnnotation = false)
Parameters
increment
int?The amount to increment between values.
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
- IConventionSequenceBuilder
The same builder instance if the configuration was applied, null otherwise.
IsCyclic(bool?, bool)
Sets whether or not the sequence will start again from the beginning once the maximum value is reached.
IConventionSequenceBuilder IsCyclic(bool? cyclic, bool fromDataAnnotation = false)
Parameters
cyclic
bool?If true, then the sequence with restart when the maximum is reached.
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
- IConventionSequenceBuilder
The same builder instance if the configuration was applied, null otherwise.
StartsAt(long?, bool)
Sets the sequence to start at the given value.
IConventionSequenceBuilder StartsAt(long? startValue, bool fromDataAnnotation = false)
Parameters
startValue
long?The starting value for the sequence.
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
- IConventionSequenceBuilder
The same builder instance if the configuration was applied, null otherwise.