ObjectContext.ObjectMaterialized 事件
[此頁面專屬於 Entity Framework 第 6 版。最新版本可從 'Entity Framework' NuGet 套件取得。如需 Entity Framework 的詳細資訊,請參閱 msdn.com/data/ef。]
在查詢或載入作業中,從資料來源中的資料建立新的實體物件時發生。
命名空間: System.Data.Entity.Core.Objects
組件: EntityFramework (在 EntityFramework.dll 中)
語法
'宣告
Public Event ObjectMaterialized As ObjectMaterializedEventHandler
'用途
Dim instance As ObjectContext
Dim handler As ObjectMaterializedEventHandler
AddHandler instance.ObjectMaterialized, handler
public event ObjectMaterializedEventHandler ObjectMaterialized
public:
event ObjectMaterializedEventHandler^ ObjectMaterialized {
void add (ObjectMaterializedEventHandler^ value);
void remove (ObjectMaterializedEventHandler^ value);
}
member ObjectMaterialized : IEvent<ObjectMaterializedEventHandler,
ObjectMaterializedEventArgs>
JScript supports the use of events, but not the declaration of new ones.