ObjectSet<TEntity>.ApplyCurrentValues(TEntity) 方法

定義

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

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

參數

currentEntity
TEntity

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

傳回

TEntity

更新後的物件。

備註

此方法包覆整個 ApplyCurrentValues 方法。

適用於

另請參閱