ObjectContext.ObjectMaterialized CTP5 [英] ObjectContext.ObjectMaterialized CTP5

查看:71
本文介绍了ObjectContext.ObjectMaterialized CTP5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我看来,ObjectMaterializedEventHandler传递的ObjectMaterializedEventArgs的Entity属性不是实体本身,而是System.Data.Objects.EntityEntry的一个实例,它是一个内部密封类,因此我不能
用它做任何事情。您有什么建议吗?

解决方案

您好,


实体属性是实际实体正在实现而不是EntityEntry。


如果你看到不同的东西,你可以发布一些代码来重现这个问题。


~Rowan


It appears to me that the Entity property of the ObjectMaterializedEventArgs passed by the ObjectMaterializedEventHandler is not the entity itself but an instance of System.Data.Objects.EntityEntry which is an internal sealed class and therefore I can't do anything with it. Do you have any suggestions?

解决方案

Hi,

The Entity property is the actual entity that is being materialized and not an EntityEntry.

If you are seeing something different can you post up some code that reproduces the issue.

~Rowan


这篇关于ObjectContext.ObjectMaterialized CTP5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆