src/Misc/EFTools/EntityDesignDatabaseGeneration/OutputGenerators/OutputGeneratorHelpers.cs
// <summary>
//     A name derived from a *:* association will be: FK_[Association Name]_[End Name]. Note that we are
//     getting the association name for *one* of the SSDL associations that are inferred from a CSDL *:*
//     association. The 'principalEnd' corresponds to the end of the *:* association that will become
//     the principal end in the 1:* association (where the * end is the newly-constructed entity corresponding
//     to the link table)
// </summary>
A name derived from a *:* association will be: FK_[Association Name]_[End Name]. Note that we are
getting the association name for *one* of the SSDL associations that are inferred from a CSDL *:
association. The 'principalEnd' corresponds to the end of the *:* association that will become
the principal end in the 1:* association (where the * end is the newly-constructed entity corresponding
to the link table)
A name derived from a * : * association will be : FK_ [ Association Name ] _ [ End Name ] . Note that we are getting the association name for * one * of the SSDL associations that are inferred from a CSDL * : association . The ' principalEnd ' corresponds to the end of the * : * association that will become the principal end in the 1 : * association ( where the * end is the newly - constructed entity corresponding to the link table )
internal static string GetStorageAssociationNameFromManyToMany(AssociationEndMember principalEnd)
        {
            var association = principalEnd.DeclaringType as AssociationType;
            Debug.Assert(
                association != null, "The DeclaringType of the AssociationEndMember " + principalEnd.Name + " should be an AssociationType");
            Debug.Assert(principalEnd != null, "The principal end cannot be null");
            var associationName = String.Empty;
            if (association != null
                && principalEnd != null)
            {
                associationName = String.Format(
                    CultureInfo.CurrentCulture, Resources.CodeViewManyToManyAssocName, association.Name, principalEnd.Name);
            }
            return associationName;
        }
internal static string GetStorageAssociationNameFromManyToMany ( AssociationEndMember principalEnd ) { var association = principalEnd . DeclaringType as AssociationType ; Debug . Assert ( association != null , " " + principalEnd . Name + " " ) ; Debug . Assert ( principalEnd != null , " " ) ; var associationName = String . Empty ; if ( association != null && principalEnd != null ) { associationName = String . Format ( CultureInfo . CurrentCulture , Resources . CodeViewManyToManyAssocName , association . Name , principalEnd . Name ) ; } return associationName ; }
A name derived from a *:* association will be: FK_[Association Name]_[End Name].
A name derived from a * : * association will be : FK_ [ Association Name ] _ [ End Name ] .
principalEnd
AssociationEndMember