src/Misc/EFTools/EntityDesignDatabaseGeneration/MetadataWorkspaceExtensions.cs
/// <summary>
///     Determines if an association is across solely primary keys
/// </summary>
/// <param name="association">The association.</param>
/// <returns>true if the multiplicity of the association is 1:1, 1:0..1, or 0..1:0..1, and false otherwise</returns>
Determines if an association is across solely primary keys
Determines if an association is across solely primary keys
public static bool IsPKToPK(this AssociationType association)
        {
            if ((association.GetEnd1().RelationshipMultiplicity == RelationshipMultiplicity.One
                 || association.GetEnd1().RelationshipMultiplicity == RelationshipMultiplicity.ZeroOrOne)
                &&
                (association.GetEnd2().RelationshipMultiplicity == RelationshipMultiplicity.One
                 || association.GetEnd2().RelationshipMultiplicity == RelationshipMultiplicity.ZeroOrOne))
            {
                return true;
            }
            return false;
        }
public static bool IsPKToPK ( this AssociationType association ) { if ( ( association . GetEnd1 ( ) . RelationshipMultiplicity == RelationshipMultiplicity . One || association . GetEnd1 ( ) . RelationshipMultiplicity == RelationshipMultiplicity . ZeroOrOne ) && ( association . GetEnd2 ( ) . RelationshipMultiplicity == RelationshipMultiplicity . One || association . GetEnd2 ( ) . RelationshipMultiplicity == RelationshipMultiplicity . ZeroOrOne ) ) { return true ; } return false ; }
Determines if an association is across solely primary keys
Determines if an association is across solely primary keys
true if the multiplicity of the association is 1:1, 1:0..1, or 0..1:0..1, and false otherwise
true if the multiplicity of the association is 1 : 1 1 : 0 .. 1 or 0 .. 1 : 0 .. 1 and false otherwise
AssociationType
this
association
None