src/Shared/EntityFramework/Core/Query/PlanCompiler/TypeInfo.cs
// <summary>
// Get the list of "key" properties (in the flattened type)
// </summary>
// <returns> the key property equivalents in the flattened type </returns>
Get the list of "key" properties (in the flattened type)
Get the list of " key " properties ( in the flattened type )
[SuppressMessage("Microsoft.Naming", "CA2204:Literals should be spelled correctly", MessageId = "Non-EdmProperty")]
        [SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters",
            MessageId = "System.Data.Entity.Core.Query.PlanCompiler.PlanCompiler.Assert(System.Boolean,System.String)")]
        internal IEnumerable<PropertyRef> GetKeyPropertyRefs()
        {
            md.EntityTypeBase entityType = null;
            md.RefType refType = null;
            if (TypeHelpers.TryGetEdmType(m_type, out refType))
            {
                entityType = refType.ElementType;
            }
            else
            {
                entityType = TypeHelpers.GetEdmType<md.EntityTypeBase>(m_type);
            }
            foreach (var p in entityType.KeyMembers)
            {
                PlanCompiler.Assert(p is md.EdmProperty, "Non-EdmProperty key members are not supported");
                var spr = new SimplePropertyRef(p);
                yield return spr;
            }
        }
[ SuppressMessage ( " " , " " , MessageId = " " ) ] [ SuppressMessage ( " " , " " , MessageId = " " ) ] internal IEnumerable < PropertyRef > GetKeyPropertyRefs ( ) { md . EntityTypeBase entityType = null ; md . RefType refType = null ; if ( TypeHelpers . TryGetEdmType ( m_type , out refType ) ) { entityType = refType . ElementType ; } else { entityType = TypeHelpers . GetEdmType < md . EntityTypeBase > ( m_type ) ; } foreach ( var p in entityType . KeyMembers ) { PlanCompiler . Assert ( p is md . EdmProperty , " " ) ; var spr = new SimplePropertyRef ( p ) ; yield return spr ; } }
Get the list of "key" properties (in the flattened type)
Get the list of " key " properties ( in the flattened type )
// Walk through the list of keys of the entity type, and find their analogs in the // "flattened" type // Eventually this could be RelationshipEndMember, but currently only properties are suppported as key members
the key property equivalents in the flattened type
the key property equivalents in the flattened type