IgnoringIdentityResolutionInterceptor.UpdateTrackedInstance 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
當 a DbContext 嘗試追蹤一個實體的新實例,其主鍵值與已追蹤的實例相同時,會被呼叫。 此實作不做任何事,因此保留現有追蹤實例的屬性值。
public virtual void UpdateTrackedInstance(Microsoft.EntityFrameworkCore.Diagnostics.IdentityResolutionInterceptionData interceptionData, Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry existingEntry, object newEntity);
abstract member UpdateTrackedInstance : Microsoft.EntityFrameworkCore.Diagnostics.IdentityResolutionInterceptionData * Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry * obj -> unit
override this.UpdateTrackedInstance : Microsoft.EntityFrameworkCore.Diagnostics.IdentityResolutionInterceptionData * Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry * obj -> unit
Public Overridable Sub UpdateTrackedInstance (interceptionData As IdentityResolutionInterceptionData, existingEntry As EntityEntry, newEntity As Object)
參數
- interceptionData
- IdentityResolutionInterceptionData
關於身份解析的上下文資訊。
- existingEntry
- EntityEntry
這是現有追蹤實體實例的條目。
- newEntity
- Object
這個新的實體實例,會在這次呼叫後被丟棄。