/// <summary>
        ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
        ///     directly from your code. This API may change or be removed in future releases.
        /// </summary>
        public virtual InternalEntityEntry TryGetEntry(object[] keyValues)
        {
            InternalEntityEntry entry;
            var key = PrincipalKeyValueFactory.CreateFromKeyValues(keyValues);

            return(key != null && _identityMap.TryGetValue((TKey)key, out entry) ? entry : null);
        }
Exemple #2
0
 /// <summary>
 ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
 ///     directly from your code. This API may change or be removed in future releases.
 /// </summary>
 public virtual void Add(object[] keyValues, InternalEntityEntry entry)
 => Add((TKey)PrincipalKeyValueFactory.CreateFromKeyValues(keyValues), entry);