共用方式為


ObjectContext.Refresh 方法 (RefreshMode, IEnumerable)

[此頁面專屬於 Entity Framework 第 6 版。最新版本可從 'Entity Framework' NuGet 套件取得。如需 Entity Framework 的詳細資訊,請參閱 msdn.com/data/ef。]

命名空間:  System.Data.Entity.Core.Objects
組件:  EntityFramework (在 EntityFramework.dll 中)

語法

'宣告
Public Overridable Sub Refresh ( _
    refreshMode As RefreshMode, _
    collection As IEnumerable _
)
'用途
Dim instance As ObjectContext 
Dim refreshMode As RefreshMode 
Dim collection As IEnumerable

instance.Refresh(refreshMode, collection)
public virtual void Refresh(
    RefreshMode refreshMode,
    IEnumerable collection
)
public:
virtual void Refresh(
    RefreshMode refreshMode, 
    IEnumerable^ collection
)
abstract Refresh : 
        refreshMode:RefreshMode * 
        collection:IEnumerable -> unit  
override Refresh : 
        refreshMode:RefreshMode * 
        collection:IEnumerable -> unit
public function Refresh(
    refreshMode : RefreshMode, 
    collection : IEnumerable
)

參數

例外狀況

例外狀況 條件
ArgumentNullException

collection 是 null。

ArgumentOutOfRangeException

refreshMode 無效。

ArgumentException

collection 為空白,或者物件沒有附加至內容。

請參閱

參考

ObjectContext 類別

Refresh 多載

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