Share via


ValidationRules.NavigationPropertyWithRecursiveContainmentTargetMustBeOptional Field

Validates that if a navigation property has ContainsTarget = true and the target entity type is the same as the declaring type of the property, then the multiplicity of the target of navigation is 0..1 or Many. This depends on there being a targetting cycle. Because of the rule EntitySetNavigationMappingMustBeBidirectional, we know that either this is always true, or there will be an error

Namespace:  Microsoft.Data.Edm.Validation
Assembly:  Microsoft.Data.Edm (in Microsoft.Data.Edm.dll)

Syntax

'Declaration
Public Shared ReadOnly NavigationPropertyWithRecursiveContainmentTargetMustBeOptional As ValidationRule(Of IEdmNavigationProperty)
'Usage
Dim value As ValidationRule(Of IEdmNavigationProperty)

value = ValidationRules.NavigationPropertyWithRecursiveContainmentTargetMustBeOptional
public static readonly ValidationRule<IEdmNavigationProperty> NavigationPropertyWithRecursiveContainmentTargetMustBeOptional
public:
static initonly ValidationRule<IEdmNavigationProperty^>^ NavigationPropertyWithRecursiveContainmentTargetMustBeOptional
static val NavigationPropertyWithRecursiveContainmentTargetMustBeOptional: ValidationRule<IEdmNavigationProperty>
public static final var NavigationPropertyWithRecursiveContainmentTargetMustBeOptional : ValidationRule<IEdmNavigationProperty>

See Also

Reference

ValidationRules Class

Microsoft.Data.Edm.Validation Namespace