Exemplo n.º 1
0
        public override InternalEntityTypeBuilder Apply(InternalEntityTypeBuilder entityTypeBuilder, TableAttribute attribute)
        {
            Check.NotNull(entityTypeBuilder, nameof(entityTypeBuilder));
            Check.NotNull(attribute, nameof(attribute));

            if (!string.IsNullOrWhiteSpace(attribute.Schema))
            {
                entityTypeBuilder.Annotation(RelationalAnnotationNames.Prefix + RelationalAnnotationNames.Schema, attribute.Schema, ConfigurationSource.DataAnnotation);
            }

            if (!string.IsNullOrWhiteSpace(attribute.Name))
            {
                entityTypeBuilder.Annotation(RelationalAnnotationNames.Prefix + RelationalAnnotationNames.TableName, attribute.Name, ConfigurationSource.DataAnnotation);
            }

            return(entityTypeBuilder);
        }
            public virtual EntityTypeBuilder Annotation([NotNull] string annotation, [NotNull] object value)
            {
                Check.NotEmpty(annotation, nameof(annotation));
                Check.NotNull(value, nameof(value));

                Builder.Annotation(annotation, value, ConfigurationSource.Explicit);

                return(this);
            }