src/Shared/EntityFramework/Core/Mapping/Update/Internal/KeyManager.cs
// <summary>
// Gets identifier for an entity key member at the given offset (ordinal of the property
// in the key properties for the relevant entity set)
// </summary>
Gets identifier for an entity key member at the given offset (ordinal of the property
in the key properties for the relevant entity set)
Gets identifier for an entity key member at the given offset ( ordinal of the property in the key properties for the relevant entity set )
internal int GetKeyIdentifierForMemberOffset(EntityKey entityKey, int memberOffset, int keyMemberCount)
        {
            int result;
            if (!_keyIdentifiers.TryGetValue(entityKey, out result))
            {
                result = _identifiers.Count;
                for (var i = 0; i < keyMemberCount; i++)
                {
                    _identifiers.Add(new IdentifierInfo());
                }
                _keyIdentifiers.Add(entityKey, result);
            }
            result += memberOffset;
            return result;
        }
internal int GetKeyIdentifierForMemberOffset ( EntityKey entityKey , int memberOffset , int keyMemberCount ) { int result ; if ( ! _keyIdentifiers . TryGetValue ( entityKey , out result ) ) { result = _identifiers . Count ; for ( var i = 0 ; i < keyMemberCount ; i ++ ) { _identifiers . Add ( new IdentifierInfo ( ) ) ; } _keyIdentifiers . Add ( entityKey , result ) ; } result += memberOffset ; return result ; }
Gets identifier for an entity key member at the given offset (ordinal of the property
in the key properties for the relevant entity set)
Gets identifier for an entity key member at the given offset ( ordinal of the property in the key properties for the relevant entity set )
// get offset for first element of key // add memberOffset relative to first element of key
entityKey
EntityKey
memberOffset
int
keyMemberCount
int