ObjectSet<TEntity>.ApplyCurrentValues 方法
[此頁面專屬於 Entity Framework 第 6 版。最新版本可從 'Entity Framework' NuGet 套件取得。如需 Entity Framework 的詳細資訊,請參閱 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
更新的物件。