protected override bool GetIsRequired()
 {
     if (base.GetIsRequired())
     {
         return(true);
     }
     return(!_domainModelConstraintProvider.IsNullable(PropertyInfo));
 }
Exemplo n.º 2
0
        private bool IsNullable()
        {
            if (PropertyInfo.PropertyType.IsValueType)
            {
                return(Nullable.GetUnderlyingType(PropertyInfo.PropertyType) != null);
            }

            if (ReflectionUtility.IsDomainObject(PropertyInfo.PropertyType))
            {
                return(true);
            }

            return(_domainModelConstraintProvider.IsNullable(PropertyInfo));
        }