次の方法で共有


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
更新後のオブジェクト。

参照

参照

ObjectSet<TEntity> クラス

System.Data.Entity.Core.Objects 名前空間