Interface IDependentKeyValueFactory<TKey>
- Namespace
- Microsoft.EntityFrameworkCore.ChangeTracking
- Assembly
- Microsoft.EntityFrameworkCore.dll
A factory for key values based on the foreign key values taken from various forms of entity data.
This type is typically used by database providers (and other extensions). It is generally not used in application code.
public interface IDependentKeyValueFactory<TKey> : IDependentKeyValueFactory
Type Parameters
TKey
The generic type of the key.
- Inherited Members
Remarks
See Implementation of database providers and extensions for more information and examples.
Properties
EqualityComparer
The IEqualityComparer<T> to use for comparing key instances.
IEqualityComparer<TKey> EqualityComparer { get; }
Property Value
- IEqualityComparer<TKey>
Methods
TryCreateFromBuffer(in ValueBuffer, out TKey?)
Attempts to create a key instance using foreign key values from the given ValueBuffer.
bool TryCreateFromBuffer(in ValueBuffer valueBuffer, out TKey? key)
Parameters
valueBuffer
ValueBufferThe value buffer representing the entity instance.
key
TKeyThe key instance.
Returns
TryCreateFromCurrentValues(IUpdateEntry, out TKey?)
Attempts to create a key instance using foreign key values from the given IUpdateEntry.
bool TryCreateFromCurrentValues(IUpdateEntry entry, out TKey? key)
Parameters
entry
IUpdateEntryThe entry tracking an entity instance.
key
TKeyThe key instance.
Returns
TryCreateFromOriginalValues(IUpdateEntry, out TKey?)
Attempts to create a key instance using original foreign key values from the given IUpdateEntry.
bool TryCreateFromOriginalValues(IUpdateEntry entry, out TKey? key)
Parameters
entry
IUpdateEntryThe entry tracking an entity instance.
key
TKeyThe key instance.
Returns
TryCreateFromPreStoreGeneratedCurrentValues(IUpdateEntry, out TKey?)
Attempts to create a key instance from the given IUpdateEntry using foreign key values that were set before any store-generated values were propagated.
bool TryCreateFromPreStoreGeneratedCurrentValues(IUpdateEntry entry, out TKey? key)
Parameters
entry
IUpdateEntryThe entry tracking an entity instance.
key
TKeyThe key instance.
Returns
TryCreateFromRelationshipSnapshot(IUpdateEntry, out TKey?)
Attempts to create a key instance from the given IUpdateEntry using foreign key values from the previously known relationship.
bool TryCreateFromRelationshipSnapshot(IUpdateEntry entry, out TKey? key)
Parameters
entry
IUpdateEntryThe entry tracking an entity instance.
key
TKeyThe key instance.