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

IsIdentifyingRelationship() public method

True if the specified association type is an identifying relationship. In order to be an identifying relationship, the association must have a referential constraint where all of the dependent properties are part of the dependent type's primary key.
public IsIdentifyingRelationship ( System.Data.Metadata.Edm.AssociationType association ) : bool
association System.Data.Metadata.Edm.AssociationType
return bool
        public bool IsIdentifyingRelationship(AssociationType association)
        {
            if (association == null)
            {
                throw new ArgumentNullException("association");
            }

            return IsPrincipalEndOfIdentifyingRelationship(association.AssociationEndMembers[0]) || IsPrincipalEndOfIdentifyingRelationship(association.AssociationEndMembers[1]);
        }