public Sequence([NotNull] IModel model, [NotNull] string annotationName) { Check.NotNull(model, nameof(model)); Check.NotEmpty(annotationName, nameof(annotationName)); _model = model; _configurationSource = ConfigurationSource.Explicit; var data = SequenceData.Deserialize((string)model[annotationName]); Name = data.Name; _schema = data.Schema; _startValue = data.StartValue; _incrementBy = data.IncrementBy; _minValue = data.MinValue; _maxValue = data.MaxValue; _clrType = data.ClrType; _isCyclic = data.IsCyclic; Builder = new InternalSequenceBuilder(this, ((IConventionModel)model).Builder); }
public Sequence([NotNull] IModel model, [NotNull] string annotationName) { Check.NotNull(model, nameof(model)); Check.NotEmpty(annotationName, nameof(annotationName)); _model = model; _configurationSource = ConfigurationSource.Explicit; var data = SequenceData.Deserialize((string)model[annotationName]); _name = data.Name; _schema = data.Schema; _startValue = data.StartValue; _incrementBy = data.IncrementBy; _minValue = data.MinValue; _maxValue = data.MaxValue; _clrType = data.ClrType; _isCyclic = data.IsCyclic; #pragma warning disable EF1001 // Internal EF Core API usage. Builder = new InternalSequenceBuilder(this, ((Model)model).Builder.ModelBuilder); #pragma warning restore EF1001 // Internal EF Core API usage. }
private SequenceData GetData() => SequenceData.Deserialize((string)Model[_annotationName]);