System.Data.Entity/System/Data/Objects/DataClasses/StructuralObject.cs
/// <summary>
/// Validates that the property is not longer than allowed, and throws if it is
/// </summary>
/// <param name="value">
/// string value to be checked.
/// </param>
/// <param name="isNullable">
/// Flag indicating if this property is allowed to be null.
/// </param>
/// <param name="propertyName">
/// Name of the property that is being validated.
/// </param>
/// <exception cref="System.Data.ConstraintException">
/// The string value is null for a non-nullable string
/// </exception>
Validates that the property is not longer than allowed, and throws if it is
Validates that the property is not longer than allowed and throws if it is
protected internal static string SetValidValue(string value, bool isNullable, string propertyName)
        {
            if (value == null)
            {
                if (!isNullable)
                {
                    EntityUtil.ThrowPropertyIsNotNullable(propertyName);
                }
            }
            return value;
        }
protected internal static string SetValidValue ( string value , bool isNullable , string propertyName ) { if ( value == null ) { if ( ! isNullable ) { EntityUtil . ThrowPropertyIsNotNullable ( propertyName ) ; } } return value ; }
Validates that the property is not longer than allowed, and throws if it is
Validates that the property is not longer than allowed and throws if it is
The string value is null for a non-nullable string
The string value is null for a non - nullable string
value
string
string value to be checked.
string value to be checked .
isNullable
bool
Flag indicating if this property is allowed to be null.
Flag indicating if this property is allowed to be null .
propertyName
string
Name of the property that is being validated.
Name of the property that is being validated .