ObjectSet<TEntity>.ApplyCurrentValues(TEntity) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將所提供物件的標量值複製到具有相同鍵的物件 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 實體鍵必須與 EntityKey 中 ObjectContext某項的屬性相符。
傳回
TEntity
更新後的物件。
備註
此方法包覆整個 ApplyCurrentValues 方法。