src/Misc/EFTools/EntityDesignModel/UpdateFromDatabase/AssociationPropertyIdentity.cs
/// <summary>
///     See whether the AssociationPropertyIdentity otherApi contains a "covering" for this
///     AssociationPropertyIdentity i.e. see whether otherApi contains at least the same
///     principal DatabaseColumns (but possibly more) _and_ at least the same dependent
///     DatabaseColumns (but possibly more).
///     This allows for treating these AssociationPropertyIdentity's as identical for the purposes
///     of Update Model even if a given C-side property has been mapped to more than 1 S-side property.
/// </summary>
See whether the AssociationPropertyIdentity otherApi contains a "covering" for this
AssociationPropertyIdentity i.e. see whether otherApi contains at least the same
principal DatabaseColumns (but possibly more) _and_ at least the same dependent
DatabaseColumns (but possibly more).
This allows for treating these AssociationPropertyIdentity's as identical for the purposes
of Update Model even if a given C-side property has been mapped to more than 1 S-side property.
See whether the AssociationPropertyIdentity otherApi contains a " covering " for this AssociationPropertyIdentity i . e . see whether otherApi contains at least the same principal DatabaseColumns ( but possibly more ) _and_ at least the same dependent DatabaseColumns ( but possibly more ) . This allows for treating these AssociationPropertyIdentity ' s as identical for the purposes of Update Model even if a given C - side property has been mapped to more than 1 S - side property .
internal bool IsCoveredBy(AssociationPropertyIdentity otherApi)
        {
            var thisPrincipalColumns = PrincipalColumns;
            var otherPrincipalColumns = otherApi.PrincipalColumns;
            if (false == otherPrincipalColumns.ContainsAll(thisPrincipalColumns))
            {
                return false;
            }
            var thisDependentColumns = DependentColumns;
            var otherDependentColumns = otherApi.DependentColumns;
            if (false == otherDependentColumns.ContainsAll(thisDependentColumns))
            {
                return false;
            }
            return true;
        }
internal bool IsCoveredBy ( AssociationPropertyIdentity otherApi ) { var thisPrincipalColumns = PrincipalColumns ; var otherPrincipalColumns = otherApi . PrincipalColumns ; if ( false == otherPrincipalColumns . ContainsAll ( thisPrincipalColumns ) ) { return false ; } var thisDependentColumns = DependentColumns ; var otherDependentColumns = otherApi . DependentColumns ; if ( false == otherDependentColumns . ContainsAll ( thisDependentColumns ) ) { return false ; } return true ; }
See whether the AssociationPropertyIdentity otherApi contains a "covering" for this
AssociationPropertyIdentity i.e.
See whether the AssociationPropertyIdentity otherApi contains a " covering " for this AssociationPropertyIdentity i . e .
// check whether all this.PrincipalColumns are contained in otherApi.PrincipalColumns // thisPrincipalColumns has at least one DatabaseColumn which is not // in otherPrincipalColumns, so otherApi does not cover thisApi // check whether all this.DependentColumns are contained in otherApi.DependentColumns // thisDependentColumns has at least one DatabaseColumn which is not // in otherDependentColumns, so otherApi does not cover thisApi // the Principal and Dependent DatabaseColumns for this are covered by the Principal  // and Dependent DatabaseColumns in otherApi
otherApi
AssociationPropertyIdentity