src/Shared/EntityFramework/Core/Query/InternalTrees/relpropertyhelper.cs
// <summary>
// Add the rel property induced by the specified relationship, (if the target
// end has a multiplicity of one)
// We only keep track of rel-properties that are "interesting"
// </summary>
// <param name="associationType"> the association relationship </param>
// <param name="fromEnd"> source end of the relationship traversal </param>
// <param name="toEnd"> target end of the traversal </param>
Add the rel property induced by the specified relationship, (if the target
end has a multiplicity of one)
We only keep track of rel-properties that are "interesting"
Add the rel property induced by the specified relationship ( if the target end has a multiplicity of one ) We only keep track of rel - properties that are " interesting "
private void AddRelProperty(
            AssociationType associationType,
            AssociationEndMember fromEnd, AssociationEndMember toEnd)
        {
            if (toEnd.RelationshipMultiplicity
                == RelationshipMultiplicity.Many)
            {
                return;
            }
            var prop = new RelProperty(associationType, fromEnd, toEnd);
            if (_interestingRelProperties == null
                ||
                !_interestingRelProperties.Contains(prop))
            {
                return;
            }
            var entityType = ((RefType)fromEnd.TypeUsage.EdmType).ElementType;
            List<RelProperty> propList;
            if (!_relPropertyMap.TryGetValue(entityType, out propList))
            {
                propList = new List<RelProperty>();
                _relPropertyMap[entityType] = propList;
            }
            propList.Add(prop);
        }
private void AddRelProperty ( AssociationType associationType , AssociationEndMember fromEnd , AssociationEndMember toEnd ) { if ( toEnd . RelationshipMultiplicity == RelationshipMultiplicity . Many ) { return ; } var prop = new RelProperty ( associationType , fromEnd , toEnd ) ; if ( _interestingRelProperties == null || ! _interestingRelProperties . Contains ( prop ) ) { return ; } var entityType = ( ( RefType ) fromEnd . TypeUsage . EdmType ) . ElementType ; List < RelProperty > propList ; if ( ! _relPropertyMap . TryGetValue ( entityType , out propList ) ) { propList = new List < RelProperty > ( ) ; _relPropertyMap [ entityType ] = propList ; } propList . Add ( prop ) ; }
Add the rel property induced by the specified relationship, (if the target
end has a multiplicity of one)
We only keep track of rel-properties that are "interesting"
Add the rel property induced by the specified relationship ( if the target end has a multiplicity of one ) We only keep track of rel - properties that are " interesting "
associationType
AssociationType
the association relationship
the association relationship
fromEnd
AssociationEndMember
source end of the relationship traversal
source end of the relationship traversal
toEnd
AssociationEndMember
target end of the traversal
target end of the traversal