IEntityConfiguration可以公开吗? [英] Can IEntityConfiguration be Public?

查看:69
本文介绍了IEntityConfiguration可以公开吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有任何理由不能将由EntityConfiguration< T>实现的IEntityConfiguration接口公开?模型构建器支持的仅代码方法似乎做出了(无根据的)假设,即模型构造应该仅在通用上下文中发生
。我希望能够使用我自己的元数据模型来推动模型构建。为了做到这一点,需要能够通过非通用上下文访问构造引擎,这将启用
通过使非通用IEntityConfiguration(和其他相关接口)公开可用。

解决方案


Fluent API有意针对强类型体验,但我们意识到需要能够使用"反射式"方法执行配置。我们仍然在研究如何适应模型创建管道
所以我对它的外观或什么时候没有任何明确的答案。


〜罗文


Is there any reason why the IEntityConfiguration interface, realized by EntityConfiguration<T>, cannot be made public? The code-only approach supported by ModelBuilder seems to make the (unwarranted) assumption that model construction should occur only whithin generic contexts. I would like to be able to drive model construction with my own metadata model. In order to do this properly, one needs to be able to access the construction engine via non-generic contexts and this would be enabled by making the non-generic IEntityConfiguration (and other relevant interfaces) publically available.

解决方案

Hi,

The Fluent API is intentionally targeted at a strongly typed experience but we realize that there is a need to be able to perform configuration using a 'reflection-style' approach. We're still working through how this fits in the model creation pipeline so I don't have any definite answers on what it will look like or when it will be available.

~Rowan


这篇关于IEntityConfiguration可以公开吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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