驗證如果導覽屬性的 ContainsTarget = true 且目標實體類型與屬性的宣告型別相同,則導覽來源的多重性是「零或一」。 這取決於是否有目標循環。 由於規則 EntitySetNavigationMappingMustBeBidirectional 所致,我們知道這一定是 true,否則會有錯誤
命名空間: Microsoft.Data.Edm.Validation
組件: Microsoft.Data.Edm (在 Microsoft.Data.Edm.dll 中)
語法
'宣告
Public Shared ReadOnly NavigationPropertyWithRecursiveContainmentSourceMustBeFromZeroOrOne As ValidationRule(Of IEdmNavigationProperty)
'用途
Dim value As ValidationRule(Of IEdmNavigationProperty)
value = ValidationRules.NavigationPropertyWithRecursiveContainmentSourceMustBeFromZeroOrOne
public static readonly ValidationRule<IEdmNavigationProperty> NavigationPropertyWithRecursiveContainmentSourceMustBeFromZeroOrOne
public:
static initonly ValidationRule<IEdmNavigationProperty^>^ NavigationPropertyWithRecursiveContainmentSourceMustBeFromZeroOrOne
static val NavigationPropertyWithRecursiveContainmentSourceMustBeFromZeroOrOne: ValidationRule<IEdmNavigationProperty>
public static final var NavigationPropertyWithRecursiveContainmentSourceMustBeFromZeroOrOne : ValidationRule<IEdmNavigationProperty>