Пример #1
0
        private void MapPrimitiveProperty(PrimitiveMemberInfoMetadata member)
        {
            if (member.SupportLength && member.Length.HasValue)
            {
                annotationsMap
                .Property(
                    member.Name,
                    m =>
                {
                    AccessorHelper.SetAccessor(member, m);
                    m.NotNullable(member.Required);
                    m.Length(member.Length.Value);
                });
                return;
            }

            annotationsMap
            .Property(
                member.Name,
                m =>
            {
                m.NotNullable(member.Required);
                AccessorHelper.SetAccessor(member, m);
            });
        }