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 的实体键必须与 中ObjectContext某个条目的 属性匹配EntityKey

返回

TEntity

已更新的对象。

适用于