src/Shared/EntityFramework/Core/Query/PlanCompiler/ColumnMapProcessor.cs
// <summary>
// Build out an EntityIdentity structure - for use by EntityColumnMap and RefColumnMap
// </summary>
// <param name="entityType"> the entity type in question </param>
// <param name="entitySetIdColumnMap"> column map for the entitysetid column </param>
// <param name="keyColumnMaps"> column maps for the keys </param>
Build out an EntityIdentity structure - for use by EntityColumnMap and RefColumnMap
Build out an EntityIdentity structure - for use by EntityColumnMap and RefColumnMap
[SuppressMessage("Microsoft.Naming", "CA2204:Literals should be spelled correctly", MessageId = "entitySet")]
        [SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters",
            MessageId = "System.Data.Entity.Core.Query.PlanCompiler.PlanCompiler.Assert(System.Boolean,System.String)")]
        private EntityIdentity CreateEntityIdentity(
            md.EntityType entityType,
            SimpleColumnMap entitySetIdColumnMap,
            SimpleColumnMap[] keyColumnMaps)
        {
             If we have an entitysetid (and therefore, a column map for the entitysetid), 
             then use a discriminated entity identity; otherwise, we use a simpleentityidentity
             instead
            if (entitySetIdColumnMap != null)
            {
                return new DiscriminatedEntityIdentity(entitySetIdColumnMap, m_typeInfo.EntitySetIdToEntitySetMap, keyColumnMaps);
            }
            else
            {
                var entitySet = m_typeInfo.GetEntitySet(entityType);
                PlanCompiler.Assert(
                    entitySet != null, "Expected non-null entitySet when no entity set ID is required. Entity type = " + entityType);
                return new SimpleEntityIdentity(entitySet, keyColumnMaps);
            }
        }
[ SuppressMessage ( " " , " " , MessageId = " " ) ] [ SuppressMessage ( " " , " " , MessageId = " " ) ] private EntityIdentity CreateEntityIdentity ( md . EntityType entityType , SimpleColumnMap entitySetIdColumnMap , SimpleColumnMap [ ] keyColumnMaps ) { if ( entitySetIdColumnMap != null ) { return new DiscriminatedEntityIdentity ( entitySetIdColumnMap , m_typeInfo . EntitySetIdToEntitySetMap , keyColumnMaps ) ; } else { var entitySet = m_typeInfo . GetEntitySet ( entityType ) ; PlanCompiler . Assert ( entitySet != null , " " + entityType ) ; return new SimpleEntityIdentity ( entitySet , keyColumnMaps ) ; } }
Build out an EntityIdentity structure - for use by EntityColumnMap and RefColumnMap
Build out an EntityIdentity structure - for use by EntityColumnMap and RefColumnMap
// // If we have an entitysetid (and therefore, a column map for the entitysetid),  // then use a discriminated entity identity; otherwise, we use a simpleentityidentity // instead //
entityType
md.EntityType
the entity type in question
the entity type in question
entitySetIdColumnMap
SimpleColumnMap
column map for the entitysetid column
column map for the entitysetid column
keyColumnMaps
SimpleColumnMap[]
column maps for the keys
column maps for the keys