ObjectSet<TEntity>.ApplyCurrentValues 方法

[本页针对的是实体框架版本 6。最新版本以“实体框架”NuGet 包的形式提供。有关实体框架的更多信息,请参见 msdn.com/data/ef。]

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

命名空间:  System.Data.Entity.Core.Objects
程序集:  EntityFramework(在 EntityFramework.dll 中)

语法

声明
Public Function ApplyCurrentValues ( _
    currentEntity As TEntity _
) As TEntity
用法
Dim instance As ObjectSet 
Dim currentEntity As TEntity
Dim returnValue As TEntity

returnValue = instance.ApplyCurrentValues(currentEntity)
public TEntity ApplyCurrentValues(
    TEntity currentEntity
)
public:
TEntity ApplyCurrentValues(
    TEntity currentEntity
)
member ApplyCurrentValues : 
        currentEntity:'TEntity -> 'TEntity 
public function ApplyCurrentValues(
    currentEntity : TEntity
) : TEntity

参数

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

返回值

类型:TEntity
已更新的对象。

请参阅

参考

ObjectSet<TEntity> 类

System.Data.Entity.Core.Objects 命名空间