CreateProxyTypes和LoadFromAssembly在哪里 [英] where is CreateProxyTypes and LoadFromAssembly

查看:63
本文介绍了CreateProxyTypes和LoadFromAssembly在哪里的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用ObjectContext,我可以提前创建代理,以节省大型模型的一些成本。但是,我没有在DbContext上看到该选项。另外,如果我想指定哪个加载我的poco对象,我该怎么做?我在DbContext中看不到loadfromassembly


 


谢谢


Zeeshan Hirani Apress的Entity Framework 4.0食谱


http://weblogs.asp.net/zeeshanhirani

解决方案

Zeeshan,


 


这些方法目前未在DbContext上公开。 
您需要下拉到ObjectContext才能使用它们。 
我们可能会在DbContext(或相关类)上公开它们,但我们会谨慎地向表面添加新方法,因为我们有意将复杂性和概念数量保持在较低水平。 
了解您使用这些场景的场景以及您认为这些场景的常见程度会很有用吗? 
根据这里的情况,我的意思是比你在帖子中提到的事情更高级别的场景—也就是说,你在什么类型的应用程序中使用它们以及什么时候? 
我们可以看到的另一件事是修复/更改其他行为,以便在不添加API表面的情况下更好地工作。


 


谢谢,


亚瑟


With ObjectContext, i can create my proxies ahead of time to save some cost for a large model. However i dont see that option on the DbContext. Also if i want to specify which assmebly to load my poco object where do i do that ? I dont see loadfromassembly in the DbContext.

 

Thanks


Zeeshan Hirani Entity Framework 4.0 Recipes by Apress
http://weblogs.asp.net/zeeshanhirani

解决方案

Zeeshan,

 

These methods are not currently exposed on DbContext.  You would need to drop down to ObjectContext to use them.  We may expose them on DbContext (or a related class) but we are careful about adding new methods to the surface since we purposefully want to keep the complexity and concept count low.  It would be useful to know the scenarios where you use these and how common you think those scenarios are?  By scenarios here I mean higher-level scenarios than the things you mention in your post—that is, in what kinds of application do you use these and when?  Another thing we may look at is fixing/changing other behaviors to allow these scenarios to work better without adding to the API surface.

 

Thanks,

Arthur


这篇关于CreateProxyTypes和LoadFromAssembly在哪里的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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