ObjectSet<TEntity>.ApplyCurrentValues(TEntity) 方法

定义

将标量值从提供的对象复制到 ObjectContext 中具有相同键的对象中。

public TEntity ApplyCurrentValues(TEntity currentEntity);

参数

currentEntity
TEntity

其属性更新将应用于原始对象的已分离对象。 currentEntity 的实体键必须与 EntityKey 中某个项的 ObjectContext 属性相匹配。

返回

TEntity

已更新的对象。

注解

此方法是 方法的 ApplyCurrentValues 包装器。

适用于

产品 版本
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

另请参阅