Example #1
0
        public override InternalPropertyBuilder Apply(InternalPropertyBuilder propertyBuilder, MaxLengthAttribute attribute, PropertyInfo clrProperty)
        {
            Check.NotNull(propertyBuilder, nameof(propertyBuilder));
            Check.NotNull(attribute, nameof(attribute));

            if (attribute.Length > 0)
            {
                propertyBuilder.MaxLength(attribute.Length, ConfigurationSource.DataAnnotation);
            }

            return(propertyBuilder);
        }