src/Shared/EntityFramework/Internal/EntityEntries/InternalEntityEntry.cs
// <summary>
// Gets the type of entity or entities at the target end of the given navigation property.
// </summary>
// <param name="navigationProperty"> The navigation property. </param>
// <returns> The CLR type of the entity or entities at the other end. </returns>
Gets the type of entity or entities at the target end of the given navigation property.
Gets the type of entity or entities at the target end of the given navigation property .
private Type GetNavigationTargetType(NavigationProperty navigationProperty)
        {
            var metadataWorkspace = _internalContext.ObjectContext.MetadataWorkspace;
            var cSpaceType =
                navigationProperty.RelationshipType.RelationshipEndMembers.Single(
                    e => navigationProperty.ToEndMember.Name == e.Name).
                                   GetEntityType();
            var oSpaceType = metadataWorkspace.GetObjectSpaceType(cSpaceType);
            var objectItemCollection = (ObjectItemCollection)metadataWorkspace.GetItemCollection(DataSpace.OSpace);
            return objectItemCollection.GetClrType(oSpaceType);
        }
private Type GetNavigationTargetType ( NavigationProperty navigationProperty ) { var metadataWorkspace = _internalContext . ObjectContext . MetadataWorkspace ; var cSpaceType = navigationProperty . RelationshipType . RelationshipEndMembers . Single ( e => navigationProperty . ToEndMember . Name == e . Name ) . GetEntityType ( ) ; var oSpaceType = metadataWorkspace . GetObjectSpaceType ( cSpaceType ) ; var objectItemCollection = ( ObjectItemCollection ) metadataWorkspace . GetItemCollection ( DataSpace . OSpace ) ; return objectItemCollection . GetClrType ( oSpaceType ) ; }
Gets the type of entity or entities at the target end of the given navigation property.
Gets the type of entity or entities at the target end of the given navigation property .
The CLR type of the entity or entities at the other end.
The CLR type of the entity or entities at the other end .
navigationProperty
NavigationProperty
The navigation property.
The navigation property .