src/Misc/EFTools/EntityDesignModel/Entity/Association.cs
/// <summary>
///     Get all associations which the entity type participates in.
/// </summary>
/// <param name="entityType"></param>
/// <returns></returns>
Get all associations which the entity type participates in.
Get all associations which the entity type participates in .
internal static HashSet<Association> GetAssociationsForEntityType(EntityType entityType)
        {
            var participatingAssociations = new HashSet<Association>();
            foreach (var associationEnd in entityType.GetAntiDependenciesOfType<AssociationEnd>())
            {
                var association = associationEnd.Parent as Association;
                if (association != null
                    && participatingAssociations.Contains(association) == false)
                {
                    participatingAssociations.Add(association);
                }
            }
            return participatingAssociations;
        }
internal static HashSet < Association > GetAssociationsForEntityType ( EntityType entityType ) { var participatingAssociations = new HashSet < Association > ( ) ; foreach ( var associationEnd in entityType . GetAntiDependenciesOfType < AssociationEnd > ( ) ) { var association = associationEnd . Parent as Association ; if ( association != null && participatingAssociations . Contains ( association ) == false ) { participatingAssociations . Add ( association ) ; } } return participatingAssociations ; }
Get all associations which the entity type participates in.
Get all associations which the entity type participates in .
// Add association connectors // First we find all the associations which the entitytype participates.
None
entityType
EntityType
None