src/Misc/EFTools/EntityDesignModel/UpdateFromDatabase/AssociationIdentityForAssociationSetMapping.cs
/// <summary>
///     See whether the AssociationIdentityForAssociationSetMapping other contains a "covering" for this
///     i.e. check that the two AssociationIdentityForAssociationSetMapping objects have the same
///     AssociationTable and that all AssociationEndIdentity's in this.Ends are covered by
///     AssociationEndIdentity's in other.Ends (for definition of "covering" see
///     method AssociationEndIdentity.IsCoveredBy(AssociationEndIdentity))
/// </summary>
See whether the AssociationIdentityForAssociationSetMapping other contains a "covering" for this
i.e. check that the two AssociationIdentityForAssociationSetMapping objects have the same
AssociationTable and that all AssociationEndIdentity's in this.Ends are covered by
AssociationEndIdentity's in other.Ends (for definition of "covering" see
method AssociationEndIdentity.IsCoveredBy(AssociationEndIdentity))
See whether the AssociationIdentityForAssociationSetMapping other contains a " covering " for this i . e . check that the two AssociationIdentityForAssociationSetMapping objects have the same AssociationTable and that all AssociationEndIdentity ' s in this . Ends are covered by AssociationEndIdentity ' s in other . Ends ( for definition of " covering " see method AssociationEndIdentity . IsCoveredBy ( AssociationEndIdentity ))
internal bool IsCoveredBy(AssociationIdentityForAssociationSetMapping other)
        {
            if (false == AssociationTable.Equals(other.AssociationTable))
            {
                return false;
            }
            foreach (var thisEndId in Ends)
            {
                var foundCoveringEndId = false;
                foreach (var otherEndId in other.Ends)
                {
                    if (thisEndId.IsCoveredBy(otherEndId))
                    {
                        foundCoveringEndId = true;
                        break;
                    }
                }
                if (false == foundCoveringEndId)
                {
                    return false;
                }
            }
            return true;
        }
internal bool IsCoveredBy ( AssociationIdentityForAssociationSetMapping other ) { if ( false == AssociationTable . Equals ( other . AssociationTable ) ) { return false ; } foreach ( var thisEndId in Ends ) { var foundCoveringEndId = false ; foreach ( var otherEndId in other . Ends ) { if ( thisEndId . IsCoveredBy ( otherEndId ) ) { foundCoveringEndId = true ; break ; } } if ( false == foundCoveringEndId ) { return false ; } } return true ; }
See whether the AssociationIdentityForAssociationSetMapping other contains a "covering" for this
i.e.
See whether the AssociationIdentityForAssociationSetMapping other contains a " covering " for this i . e .
// check whether thisEndId is covered by otherEndId // have found an AssociationEndIdentity in other.Ends which covers thisEndId // no covering AssociationEndIdentity was found for thisEndId in other.Ends // all AssociationEndIdentity's in this.Ends were covered by an AssociationEndIdentity in other.Ends
other
AssociationIdentityForAssociationSetMapping