MetadataWorkspaceExtensions.GetDependentProperty Method (EdmProperty, ReferentialConstraint)

 

If this is a property that participates in the principal end of a referential constraint, this method will return the corresponding property on the dependent end.

Namespace:   Microsoft.Data.Entity.Design.DatabaseGeneration
Assembly:  Microsoft.Data.Entity.Design.DatabaseGeneration (in Microsoft.Data.Entity.Design.DatabaseGeneration.dll)

public static EdmProperty GetDependentProperty(
	this EdmProperty property,
	ReferentialConstraint refConstraint
)

Parameters

property
Type: System.Data.Entity.Core.Metadata.Edm.EdmProperty

The property on the principal end of the referential constraint

refConstraint
Type: System.Data.Entity.Core.Metadata.Edm.ReferentialConstraint

The referential constraint.

Return Value

Type: System.Data.Entity.Core.Metadata.Edm.EdmProperty

The property on the dependent end of the referentail constraint corresponding to the property on the principal end

Exception Condition
ArgumentNullException

if the ref constraint is null

InvalidOperationException

if the property cannot be found among the properties on the principal end of the referential constraint