src/Shared/EntityFramework/Core/Query/PlanCompiler/ColumnMapProcessor.cs
// <summary>
// Create a column map for a structural column - ref/complextype/entity/record
// </summary>
// <param name="type"> Type info for the type </param>
// <param name="name"> column name </param>
Create a column map for a structural column - ref/complextype/entity/record
Create a column map for a structural column - ref / complextype / entity / record
private ColumnMap CreateStructuralColumnMap(md.TypeUsage type, string name)
        {
            var typeInfo = m_typeInfo.GetTypeInfo(type);
            if (md.TypeSemantics.IsRowType(type))
            {
                return CreateRecordColumnMap(typeInfo, name);
            }
            if (md.TypeSemantics.IsReferenceType(type))
            {
                return CreateRefColumnMap(typeInfo, name);
            }
            if (typeInfo.HasTypeIdProperty)
            {
                return CreatePolymorphicColumnMap(typeInfo, name);
            }
            if (md.TypeSemantics.IsComplexType(type))
            {
                return CreateComplexTypeColumnMap(typeInfo, name, null, null, null);
            }
            if (md.TypeSemantics.IsEntityType(type))
            {
                return CreateEntityColumnMap(typeInfo, name, null, null, null, true);
            }
            throw new NotSupportedException(type.Identity);
        }
private ColumnMap CreateStructuralColumnMap ( md . TypeUsage type , string name ) { var typeInfo = m_typeInfo . GetTypeInfo ( type ) ; if ( md . TypeSemantics . IsRowType ( type ) ) { return CreateRecordColumnMap ( typeInfo , name ) ; } if ( md . TypeSemantics . IsReferenceType ( type ) ) { return CreateRefColumnMap ( typeInfo , name ) ; } if ( typeInfo . HasTypeIdProperty ) { return CreatePolymorphicColumnMap ( typeInfo , name ) ; } if ( md . TypeSemantics . IsComplexType ( type ) ) { return CreateComplexTypeColumnMap ( typeInfo , name , null , null , null ) ; } if ( md . TypeSemantics . IsEntityType ( type ) ) { return CreateEntityColumnMap ( typeInfo , name , null , null , null , true ) ; } throw new NotSupportedException ( type . Identity ) ; }
Create a column map for a structural column - ref/complextype/entity/record
Create a column map for a structural column - ref / complextype / entity / record
// Get our augmented type information for this type // records? // ref? // polymorphic type? // process complex/entity types appropriately // Anything else is not supported (this currently includes relationship types)
type
md.TypeUsage
Type info for the type
Type info for the type
name
string
None