src/Shared/EntityFramework/Core/Mapping/Update/Internal/CompositeKey.cs
// <summary>
// Creates a merged key instance where each key component contains both elements.
// </summary>
// <param name="other"> Must be a non-null compatible key (same number of components). </param>
// <returns> Merged key. </returns>
Creates a merged key instance where each key component contains both elements.
Creates a merged key instance where each key component contains both elements .
internal CompositeKey Merge(KeyManager keyManager, CompositeKey other)
        {
            DebugCheck.NotNull(other);
            Debug.Assert(other.KeyComponents.Length == KeyComponents.Length, "expected a compatible CompositeKey");
            var mergedKeyValues = new PropagatorResult[KeyComponents.Length];
            for (var i = 0; i < KeyComponents.Length; i++)
            {
                mergedKeyValues[i] = KeyComponents[i].Merge(keyManager, other.KeyComponents[i]);
            }
            return new CompositeKey(mergedKeyValues);
        }
internal CompositeKey Merge ( KeyManager keyManager , CompositeKey other ) { DebugCheck . NotNull ( other ) ; Debug . Assert ( other . KeyComponents . Length == KeyComponents . Length , " " ) ; var mergedKeyValues = new PropagatorResult [ KeyComponents . Length ] ; for ( var i = 0 ; i < KeyComponents . Length ; i ++ ) { mergedKeyValues [ i ] = KeyComponents [ i ] . Merge ( keyManager , other . KeyComponents [ i ] ) ; } return new CompositeKey ( mergedKeyValues ) ; }
Creates a merged key instance where each key component contains both elements.
Creates a merged key instance where each key component contains both elements .
None
keyManager
KeyManager
other
CompositeKey
Must be a non-null compatible key (same number of components).
Must be a non - null compatible key ( same number of components ) .