ObjectContext.ObjectMaterialized 事件
[本页针对的是实体框架版本 6。最新版本以“实体框架”NuGet 包的形式提供。有关实体框架的更多信息,请参见 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.