src/Shared/EntityFramework/Core/Query/PlanCompiler/ColumnMapProcessor.cs
// <summary>
// Build up the list of columnmaps for the relproperties.
// Assumption: rel-properties follow after ALL the regular properties of the
// types in the type hierarchy.
// For now, we're simply going to ignore the rel-property columnmaps - we're
// just going to use this function to "drain" the corresponding vars
// </summary>
// <param name="typeInfo"> typeinfo for the entity type </param>
// <param name="includeSupertypeRelProperties"> should we get rel-properties from our supertype instances </param>
Build up the list of columnmaps for the relproperties.
Assumption: rel-properties follow after ALL the regular properties of the
types in the type hierarchy.
For now, we're simply going to ignore the rel-property columnmaps - we're
just going to use this function to "drain" the corresponding vars
Build up the list of columnmaps for the relproperties . Assumption : rel - properties follow after ALL the regular properties of the types in the type hierarchy . For now we ' re simply going to ignore the rel - property columnmaps - we ' re just going to use this function to " drain " the corresponding vars
private void BuildRelPropertyColumnMaps(TypeInfo typeInfo, bool includeSupertypeRelProperties)
        {
             Get the appropriate set of rel-properties
            IEnumerable<RelProperty> relProperties = null;
            if (includeSupertypeRelProperties)
            {
                relProperties = m_typeInfo.RelPropertyHelper.GetRelProperties(typeInfo.Type.EdmType as md.EntityTypeBase);
            }
            else
            {
                relProperties = m_typeInfo.RelPropertyHelper.GetDeclaredOnlyRelProperties(typeInfo.Type.EdmType as md.EntityTypeBase);
            }
             Create a column-map for each rel-properties
            foreach (var property in relProperties)
            {
                CreateColumnMap(property.ToEnd.TypeUsage, property.ToString());
            }
             Add all subtypes
            foreach (var subTypeInfo in typeInfo.ImmediateSubTypes)
            {
                BuildRelPropertyColumnMaps(subTypeInfo, false);
            }
        }
private void BuildRelPropertyColumnMaps ( TypeInfo typeInfo , bool includeSupertypeRelProperties ) { IEnumerable < RelProperty > relProperties = null ; if ( includeSupertypeRelProperties ) { relProperties = m_typeInfo . RelPropertyHelper . GetRelProperties ( typeInfo . Type . EdmType as md . EntityTypeBase ) ; } else { relProperties = m_typeInfo . RelPropertyHelper . GetDeclaredOnlyRelProperties ( typeInfo . Type . EdmType as md . EntityTypeBase ) ; } foreach ( var property in relProperties ) { CreateColumnMap ( property . ToEnd . TypeUsage , property . ToString ( ) ) ; } foreach ( var subTypeInfo in typeInfo . ImmediateSubTypes ) { BuildRelPropertyColumnMaps ( subTypeInfo , false ) ; } }
Build up the list of columnmaps for the relproperties.
Build up the list of columnmaps for the relproperties .
// // Get the appropriate set of rel-properties // // // Create a column-map for each rel-properties // // // Add all subtypes //
typeInfo
TypeInfo
typeinfo for the entity type
typeinfo for the entity type
includeSupertypeRelProperties
bool
should we get rel-properties from our supertype instances
should we get rel - properties from our supertype instances