Ejemplo n.º 1
0
        public RelationalAnnotationsBuilder(
            [NotNull] InternalMetadataBuilder internalBuilder,
            ConfigurationSource configurationSource,
            [CanBeNull] string providerPrefix)
            : base(internalBuilder.Metadata, providerPrefix)
        {
            Check.NotNull(internalBuilder, nameof(internalBuilder));

            EntityTypeBuilder   = internalBuilder;
            ConfigurationSource = configurationSource;
        }
Ejemplo n.º 2
0
 protected virtual void MergeAnnotationsFrom([NotNull] InternalMetadataBuilder annotatableBuilder)
 {
     foreach (var annotation in annotatableBuilder.Metadata.GetAnnotations())
     {
         HasAnnotation(
             annotation.Name,
             annotation.Value,
             annotation.GetConfigurationSource(),
             canOverrideSameSource: false);
     }
 }
        protected virtual void MergeAnnotationsFrom([NotNull] InternalMetadataBuilder annotatableBuilder)
        {
            foreach (var annotation in annotatableBuilder.Metadata.Annotations)
            {
                ConfigurationSource annotationSource;
                if (!annotatableBuilder._annotationSources.Value.TryGetValue(annotation.Name, out annotationSource))
                {
                    annotationSource = ConfigurationSource.Explicit;
                }

                Annotation(
                    annotation.Name,
                    annotation.Value,
                    annotationSource,
                    canOverrideSameSource: false);
            }
        }