Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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.
        }
Ejemplo n.º 3
0
 private SequenceData GetData() => SequenceData.Deserialize((string)Model[_annotationName]);