Table of Contents

Class StateManager

Namespace
Microsoft.EntityFrameworkCore.ChangeTracking.Internal
Assembly
Microsoft.EntityFrameworkCore.dll

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public class StateManager : IStateManager, IResettableService
Inheritance
StateManager
Implements
Inherited Members
Extension Methods

Constructors

StateManager(StateManagerDependencies)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public StateManager(StateManagerDependencies dependencies)

Parameters

dependencies StateManagerDependencies

Properties

CascadeDeleteTiming

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual CascadeTiming CascadeDeleteTiming { get; set; }

Property Value

CascadeTiming

ChangeDetector

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public IChangeDetector ChangeDetector { get; }

Property Value

IChangeDetector

ChangedCount

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual int ChangedCount { get; set; }

Property Value

int

Context

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual DbContext Context { get; }

Property Value

DbContext

Count

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual int Count { get; }

Property Value

int

DeleteOrphansTiming

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual CascadeTiming DeleteOrphansTiming { get; set; }

Property Value

CascadeTiming

Dependencies

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual StateManagerDependencies Dependencies { get; }

Property Value

StateManagerDependencies

EntityFinderFactory

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual IEntityFinderFactory EntityFinderFactory { get; }

Property Value

IEntityFinderFactory

EntityMaterializerSource

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual IEntityMaterializerSource EntityMaterializerSource { get; }

Property Value

IEntityMaterializerSource

Entries

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual IEnumerable<InternalEntityEntry> Entries { get; }

Property Value

IEnumerable<InternalEntityEntry>

InternalEntityEntryNotifier

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual IInternalEntityEntryNotifier InternalEntityEntryNotifier { get; }

Property Value

IInternalEntityEntryNotifier

Model

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual IModel Model { get; }

Property Value

IModel

SavingChanges

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual bool SavingChanges { get; set; }

Property Value

bool

SensitiveLoggingEnabled

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual bool SensitiveLoggingEnabled { get; }

Property Value

bool

UpdateLogger

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual IDiagnosticsLogger<DbLoggerCategory.Update> UpdateLogger { get; }

Property Value

IDiagnosticsLogger<DbLoggerCategory.Update>

ValueGenerationManager

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual IValueGenerationManager ValueGenerationManager { get; }

Property Value

IValueGenerationManager

Methods

AbortAttachGraph()

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual void AbortAttachGraph()

AcceptAllChanges()

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual void AcceptAllChanges()

BeginAttachGraph()

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual void BeginAttachGraph()

CaptureEvents()

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual (EventHandler<EntityTrackingEventArgs>? Tracking, EventHandler<EntityTrackedEventArgs>? Tracked, EventHandler<EntityStateChangingEventArgs>? StateChanging, EventHandler<EntityStateChangedEventArgs>? StateChanged) CaptureEvents()

Returns

(EventHandler<EntityTrackingEventArgs> Tracking, EventHandler<EntityTrackedEventArgs> Tracked, EventHandler<EntityStateChangingEventArgs> StateChanging, EventHandler<EntityStateChangedEventArgs> StateChanged)

CascadeChanges(bool)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual void CascadeChanges(bool force)

Parameters

force bool

CascadeDelete(InternalEntityEntry, bool, IEnumerable<IForeignKey>?)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual void CascadeDelete(InternalEntityEntry entry, bool force, IEnumerable<IForeignKey>? foreignKeys = null)

Parameters

entry InternalEntityEntry
force bool
foreignKeys IEnumerable<IForeignKey>

ChangingState(InternalEntityEntry, EntityState)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual void ChangingState(InternalEntityEntry entry, EntityState newState)

Parameters

entry InternalEntityEntry
newState EntityState

Clear(bool)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual void Clear(bool resetting)

Parameters

resetting bool

CompleteAttachGraph()

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual void CompleteAttachGraph()

CreateEntityFinder(IEntityType)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual IEntityFinder CreateEntityFinder(IEntityType entityType)

Parameters

entityType IEntityType

Returns

IEntityFinder

CreateEntry(IDictionary<string, object?>, IEntityType)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual InternalEntityEntry CreateEntry(IDictionary<string, object?> values, IEntityType entityType)

Parameters

values IDictionary<string, object>
entityType IEntityType

Returns

InternalEntityEntry

FindPrincipal(InternalEntityEntry, IForeignKey)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual InternalEntityEntry? FindPrincipal(InternalEntityEntry dependentEntry, IForeignKey foreignKey)

Parameters

dependentEntry InternalEntityEntry
foreignKey IForeignKey

Returns

InternalEntityEntry

FindPrincipalUsingPreStoreGeneratedValues(InternalEntityEntry, IForeignKey)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual InternalEntityEntry? FindPrincipalUsingPreStoreGeneratedValues(InternalEntityEntry dependentEntry, IForeignKey foreignKey)

Parameters

dependentEntry InternalEntityEntry
foreignKey IForeignKey

Returns

InternalEntityEntry

FindPrincipalUsingRelationshipSnapshot(InternalEntityEntry, IForeignKey)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual InternalEntityEntry? FindPrincipalUsingRelationshipSnapshot(InternalEntityEntry dependentEntry, IForeignKey foreignKey)

Parameters

dependentEntry InternalEntityEntry
foreignKey IForeignKey

Returns

InternalEntityEntry

GetCountForState(bool, bool, bool, bool, bool)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual int GetCountForState(bool added = false, bool modified = false, bool deleted = false, bool unchanged = false, bool countDeletedSharedIdentity = false)

Parameters

added bool
modified bool
deleted bool
unchanged bool
countDeletedSharedIdentity bool

Returns

int

GetDependents(IUpdateEntry, IForeignKey)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual IEnumerable<IUpdateEntry> GetDependents(IUpdateEntry principalEntry, IForeignKey foreignKey)

Parameters

principalEntry IUpdateEntry
foreignKey IForeignKey

Returns

IEnumerable<IUpdateEntry>

GetDependents(IReadOnlyList<object?>, IForeignKey)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual IEnumerable<IUpdateEntry> GetDependents(IReadOnlyList<object?> keyValues, IForeignKey foreignKey)

Parameters

keyValues IReadOnlyList<object>
foreignKey IForeignKey

Returns

IEnumerable<IUpdateEntry>

GetDependentsFromNavigation(IUpdateEntry, IForeignKey)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual IEnumerable<IUpdateEntry>? GetDependentsFromNavigation(IUpdateEntry principalEntry, IForeignKey foreignKey)

Parameters

principalEntry IUpdateEntry
foreignKey IForeignKey

Returns

IEnumerable<IUpdateEntry>

GetDependentsUsingRelationshipSnapshot(IUpdateEntry, IForeignKey)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual IEnumerable<IUpdateEntry> GetDependentsUsingRelationshipSnapshot(IUpdateEntry principalEntry, IForeignKey foreignKey)

Parameters

principalEntry IUpdateEntry
foreignKey IForeignKey

Returns

IEnumerable<IUpdateEntry>

GetEntries(IKey)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual IEnumerable<InternalEntityEntry> GetEntries(IKey key)

Parameters

key IKey

Returns

IEnumerable<InternalEntityEntry>

GetEntriesForState(bool, bool, bool, bool, bool)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual IEnumerable<InternalEntityEntry> GetEntriesForState(bool added = false, bool modified = false, bool deleted = false, bool unchanged = false, bool returnDeletedSharedIdentity = false)

Parameters

added bool
modified bool
deleted bool
unchanged bool
returnDeletedSharedIdentity bool

Returns

IEnumerable<InternalEntityEntry>

GetEntriesToSave(bool)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual IList<IUpdateEntry> GetEntriesToSave(bool cascadeChanges)

Parameters

cascadeChanges bool

Returns

IList<IUpdateEntry>

GetNonDeletedEntities<TEntity>()

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual IEnumerable<TEntity> GetNonDeletedEntities<TEntity>() where TEntity : class

Returns

IEnumerable<TEntity>

Type Parameters

TEntity

GetOrCreateEntry(object)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual InternalEntityEntry GetOrCreateEntry(object entity)

Parameters

entity object

Returns

InternalEntityEntry

GetOrCreateEntry(object, IEntityType?)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual InternalEntityEntry GetOrCreateEntry(object entity, IEntityType? entityType)

Parameters

entity object
entityType IEntityType

Returns

InternalEntityEntry

GetRecordedReferrers(object, bool)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual IEnumerable<Tuple<INavigationBase, InternalEntityEntry>> GetRecordedReferrers(object referencedEntity, bool clear)

Parameters

referencedEntity object
clear bool

Returns

IEnumerable<Tuple<INavigationBase, InternalEntityEntry>>

OnStateChanged(InternalEntityEntry, EntityState)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual void OnStateChanged(InternalEntityEntry internalEntityEntry, EntityState oldState)

Parameters

internalEntityEntry InternalEntityEntry
oldState EntityState

OnStateChanging(InternalEntityEntry, EntityState)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual void OnStateChanging(InternalEntityEntry internalEntityEntry, EntityState newState)

Parameters

internalEntityEntry InternalEntityEntry
newState EntityState

OnTracked(InternalEntityEntry, bool)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual void OnTracked(InternalEntityEntry internalEntityEntry, bool fromQuery)

Parameters

internalEntityEntry InternalEntityEntry
fromQuery bool

OnTracking(InternalEntityEntry, EntityState, bool)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual void OnTracking(InternalEntityEntry internalEntityEntry, EntityState state, bool fromQuery)

Parameters

internalEntityEntry InternalEntityEntry
state EntityState
fromQuery bool

RecordReferencedUntrackedEntity(object, INavigationBase, InternalEntityEntry)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual void RecordReferencedUntrackedEntity(object referencedEntity, INavigationBase navigation, InternalEntityEntry referencedFromEntry)

Parameters

referencedEntity object
navigation INavigationBase
referencedFromEntry InternalEntityEntry

ResetState()

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual void ResetState()

ResetStateAsync(CancellationToken)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual Task ResetStateAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A CancellationToken to observe while waiting for the task to complete.

Returns

Task

Exceptions

OperationCanceledException

If the CancellationToken is canceled.

ResolveToExistingEntry(InternalEntityEntry, INavigationBase?, InternalEntityEntry?)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual bool ResolveToExistingEntry(InternalEntityEntry newEntry, INavigationBase? navigation, InternalEntityEntry? referencedFromEntry)

Parameters

newEntry InternalEntityEntry
navigation INavigationBase
referencedFromEntry InternalEntityEntry

Returns

bool

SaveChanges(bool)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual int SaveChanges(bool acceptAllChangesOnSuccess)

Parameters

acceptAllChangesOnSuccess bool

Returns

int

SaveChanges(IList<IUpdateEntry>)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

protected virtual int SaveChanges(IList<IUpdateEntry> entriesToSave)

Parameters

entriesToSave IList<IUpdateEntry>

Returns

int

SaveChangesAsync(bool, CancellationToken)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual Task<int> SaveChangesAsync(bool acceptAllChangesOnSuccess, CancellationToken cancellationToken = default)

Parameters

acceptAllChangesOnSuccess bool
cancellationToken CancellationToken

Returns

Task<int>

SaveChangesAsync(IList<IUpdateEntry>, CancellationToken)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

protected virtual Task<int> SaveChangesAsync(IList<IUpdateEntry> entriesToSave, CancellationToken cancellationToken = default)

Parameters

entriesToSave IList<IUpdateEntry>
cancellationToken CancellationToken

Returns

Task<int>

SetEvents(EventHandler<EntityTrackingEventArgs>?, EventHandler<EntityTrackedEventArgs>?, EventHandler<EntityStateChangingEventArgs>?, EventHandler<EntityStateChangedEventArgs>?)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual void SetEvents(EventHandler<EntityTrackingEventArgs>? tracking, EventHandler<EntityTrackedEventArgs>? tracked, EventHandler<EntityStateChangingEventArgs>? stateChanging, EventHandler<EntityStateChangedEventArgs>? stateChanged)

Parameters

tracking EventHandler<EntityTrackingEventArgs>
tracked EventHandler<EntityTrackedEventArgs>
stateChanging EventHandler<EntityStateChangingEventArgs>
stateChanged EventHandler<EntityStateChangedEventArgs>

StartTracking(InternalEntityEntry)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual InternalEntityEntry StartTracking(InternalEntityEntry entry)

Parameters

entry InternalEntityEntry

Returns

InternalEntityEntry

StartTrackingFromQuery(IEntityType, object, in ValueBuffer)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual InternalEntityEntry StartTrackingFromQuery(IEntityType baseEntityType, object entity, in ValueBuffer valueBuffer)

Parameters

baseEntityType IEntityType
entity object
valueBuffer ValueBuffer

Returns

InternalEntityEntry

StopTracking(InternalEntityEntry, EntityState)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual void StopTracking(InternalEntityEntry entry, EntityState oldState)

Parameters

entry InternalEntityEntry
oldState EntityState

TryGetEntry(IKey, IReadOnlyList<object?>)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual InternalEntityEntry? TryGetEntry(IKey key, IReadOnlyList<object?> keyValues)

Parameters

key IKey
keyValues IReadOnlyList<object>

Returns

InternalEntityEntry

TryGetEntry(IKey, object?[], bool, out bool)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual InternalEntityEntry? TryGetEntry(IKey key, object?[] keyValues, bool throwOnNullKey, out bool hasNullKey)

Parameters

key IKey
keyValues object[]
throwOnNullKey bool
hasNullKey bool

Returns

InternalEntityEntry

TryGetEntry(object, IEntityType, bool)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual InternalEntityEntry? TryGetEntry(object entity, IEntityType entityType, bool throwOnTypeMismatch = true)

Parameters

entity object
entityType IEntityType
throwOnTypeMismatch bool

Returns

InternalEntityEntry

TryGetEntry(object, bool)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual InternalEntityEntry? TryGetEntry(object entity, bool throwOnNonUniqueness = true)

Parameters

entity object
throwOnNonUniqueness bool

Returns

InternalEntityEntry

TryGetEntryTyped<TKey>(IKey, TKey)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual InternalEntityEntry? TryGetEntryTyped<TKey>(IKey key, TKey keyValue)

Parameters

key IKey
keyValue TKey

Returns

InternalEntityEntry

Type Parameters

TKey

TryGetExistingEntry(object, IKey)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual InternalEntityEntry? TryGetExistingEntry(object entity, IKey key)

Parameters

entity object
key IKey

Returns

InternalEntityEntry

Unsubscribe(bool)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual void Unsubscribe(bool resetting)

Parameters

resetting bool

UpdateDependentMap(InternalEntityEntry, IForeignKey)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual void UpdateDependentMap(InternalEntityEntry entry, IForeignKey foreignKey)

Parameters

entry InternalEntityEntry
foreignKey IForeignKey

UpdateIdentityMap(InternalEntityEntry, IKey)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual void UpdateIdentityMap(InternalEntityEntry entry, IKey key)

Parameters

entry InternalEntityEntry
key IKey

UpdateReferencedUntrackedEntity(object, object, INavigationBase, InternalEntityEntry)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual void UpdateReferencedUntrackedEntity(object referencedEntity, object newReferencedEntity, INavigationBase navigation, InternalEntityEntry referencedFromEntry)

Parameters

referencedEntity object
newReferencedEntity object
navigation INavigationBase
referencedFromEntry InternalEntityEntry

Events

StateChanged

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public event EventHandler<EntityStateChangedEventArgs>? StateChanged

Event Type

EventHandler<EntityStateChangedEventArgs>

StateChanging

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public event EventHandler<EntityStateChangingEventArgs>? StateChanging

Event Type

EventHandler<EntityStateChangingEventArgs>

Tracked

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public event EventHandler<EntityTrackedEventArgs>? Tracked

Event Type

EventHandler<EntityTrackedEventArgs>

Tracking

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public event EventHandler<EntityTrackingEventArgs>? Tracking

Event Type

EventHandler<EntityTrackingEventArgs>