語言

ObjectSet<TEntity>.ApplyCurrentValues(TEntity) 方法

定義

將所提供物件的標量值複製到具有相同鍵的物件 ObjectContext 中。

public TEntity ApplyCurrentValues(TEntity currentEntity);
member this.ApplyCurrentValues : 'Entity -> 'Entity
Public Function ApplyCurrentValues (currentEntity As TEntity) As TEntity

參數

currentEntity
TEntity

分離物件中帶有屬性的更新,並套用到原始物件上。 currentEntity 的實體鍵數必須與 EntityKey 中 ObjectContext 某條目的屬性相符。

傳回

TEntity

更新後的物件。

適用於