EFUtility.CodeGenerationTools.MetadataTools.GetDependentProperties C# (CSharp) Method

GetDependentProperties() public method

Gets the collection of properties that are on the dependent end of a referential constraint for the specified navigation property. Requires: The association has a referential constraint.
public GetDependentProperties ( System.Data.Metadata.Edm.NavigationProperty navProperty ) : ReadOnlyMetadataCollection
navProperty System.Data.Metadata.Edm.NavigationProperty
return ReadOnlyMetadataCollection
        public ReadOnlyMetadataCollection<EdmProperty> GetDependentProperties(NavigationProperty navProperty)
        {
            if (navProperty == null)
            {
                throw new ArgumentNullException("navProperty");
            }

            return ((AssociationType)navProperty.RelationshipType).ReferentialConstraints[0].ToProperties;
        }