internal static HashAlgorithm CreateMetadataHashAlgorithm(double schemaVersion)
 {
     return(schemaVersion >= 2.0 ? (HashAlgorithm)MetadataHelper.CreateSHA256HashAlgorithm() : (HashAlgorithm) new MD5CryptoServiceProvider());
 }
        internal static List <AssociationSet> GetAssociationsForEntitySets(
            EntitySet entitySet1,
            EntitySet entitySet2)
        {
            List <AssociationSet> associationSetList = new List <AssociationSet>();

            foreach (EntitySetBase baseEntitySet in entitySet1.EntityContainer.BaseEntitySets)
            {
                if (Helper.IsRelationshipSet(baseEntitySet))
                {
                    AssociationSet relationshipSet = (AssociationSet)baseEntitySet;
                    if (MetadataHelper.IsExtentAtSomeRelationshipEnd(relationshipSet, (EntitySetBase)entitySet1) && MetadataHelper.IsExtentAtSomeRelationshipEnd(relationshipSet, (EntitySetBase)entitySet2))
                    {
                        associationSetList.Add(relationshipSet);
                    }
                }
            }
            return(associationSetList);
        }
 internal static ConcurrencyMode GetConcurrencyMode(EdmMember member)
 {
     return(MetadataHelper.GetConcurrencyMode(member.TypeUsage));
 }
 internal static bool IsAssociationValidForEntityType(AssociationSetEnd toEnd, EntityType type)
 {
     return(MetadataHelper.GetEntityTypeForEnd(MetadataHelper.GetOppositeEnd(toEnd).CorrespondingAssociationEndMember).IsAssignableFrom((EdmType)type));
 }