从EntityObject为什么我们不能得到的ObjectContext [英] why can't we get ObjectContext from an EntityObject

查看:174
本文介绍了从EntityObject为什么我们不能得到的ObjectContext的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是公知,如果我们有一个EntityObject没有的方式找到的ObjectContext它属于。这是不够公平我猜测,但为什么它,我们可以延迟加载的对象呢?当然延迟加载的过程中获得,以加载新的对象访问ObjectContext的?

It is well know that if we have an EntityObject that there is no way to find the ObjectContext that it belongs to. That's fair enough I guess, but why is it that we can lazy load objects then? Surely the process of lazy loading has to get access to the ObjectContext in order to load the new objects?

推荐答案

其实你可以得到的ObjectContext EntityObject :它被描述<一href="http://blogs.msdn.com/b/alexj/archive/2009/06/08/tip-24-how-to-get-the-objectcontext-from-an-entity.aspx"相对=nofollow>这里 ..

Actually you can get ObjectContext from EntityObject: It is described here..

这篇关于从EntityObject为什么我们不能得到的ObjectContext的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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