EF可以通过调用IoC Container来构造对象吗? [英] Can EF construct objects via call to IoC Container?

查看:78
本文介绍了EF可以通过调用IoC Container来构造对象吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以通过公共服务定位器或手动指定的进程使EF CTP5具体化对象?我想在我的pocos上使用构造函数注入,但EF似乎只能创建一个带有空构造函数的对象。如果
不是团队会考虑添加的东西吗?

Is it possible to make EF CTP5 materialise objects via the common service locator or a manually specified process? I would like to use constructor injection on my pocos but EF seems only to be capable of creating an object with an empty constructor. If not is this something that the team would consider adding?

推荐答案

这个CTP5或任何以前版本的EF不支持。更好地控制对象的构造,读取和写入方式是一个常见的问题以及我们在列表中要解决的问题,以便在将来的版本中解决。

This is not supported in CTP5 or any previous versions of EF. Better control over how objects are constructed, read from and written to is a common ask and something we have on the list to tackle in a future release.

我们有一个用户语音网站可以创建和投票改进EF; https://data.uservoice.com/forums/72025-ado-net-entity-framework-ef-feature-suggestions

We have a User Voice site where you can create and vote on improvements to EF; https://data.uservoice.com/forums/72025-ado-net-entity-framework-ef-feature-suggestions

~Rowan


这篇关于EF可以通过调用IoC Container来构造对象吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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