src/Shared/EntityFramework/Core/Objects/DataClasses/StructuralObject.cs
/// <summary>Validates that the property is not null, and throws if it is.</summary>
/// <returns>The validated property.</returns>
/// <param name="value">The string value to be checked.</param>
/// <param name="isNullable">Flag indicating if this property is allowed to be null.</param>
/// <param name="propertyName">The name of the property that is being validated.</param>
/// <exception cref="T:System.Data.ConstraintException">The string value is null for a non-nullable string.</exception>
Validates that the property is not null, and throws if it is.
Validates that the property is not null 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 null, and throws if it is.
Validates that the property is not null and throws if it is .
The validated property.
The validated property .
The string value is null for a non-nullable string.
The string value is null for a non - nullable string .
value
string
The string value to be checked.
The 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
The name of the property that is being validated.
The name of the property that is being validated .