实体框架中的可插拔约定 [英] Pluggable Conventions in Entity Framework
问题描述
我正在追踪 EF Feature CTP5:可插入约定创建自定义可插入约定(在这种特殊情况下可以更改所有十进制字段的精度)。
I am following EF Feature CTP5: Pluggable Conventions to create custom pluggable convention (in this particular case to change the precision of all decimal fields).
看起来像最新版本的EF 在
也是internal。我现在添加自定义可插入约定? 上添加
方法ConventionsConfiguraions
Looks like in the latest release of EF the Add
method on ConventionsConfiguraions
is also "internal'. How do i add custom Pluggable Conventions now?
推荐答案
该功能已在EF 4.1中删除,可能的实施推迟到以后的版本:
The feature has been removed in EF 4.1 and a possible implementation postponed to a later release:
代码首先可定制(可插拔)
约定不支持
支持默认的Code First
约定。
Code First customizable (pluggable) conventions are not supported. Removing the default Code First conventions is supported.
从这里引用: http://msdn.microsoft.com/en-us/l ibrary / gg696165%28v = VS.103%29.aspx
And:
删除代码第一个可插拔约定可插拔约定功能CTP5中预览了
,但
在
版本中没有实时质量。此版本仍然支持
删除默认约定。
Removal of Code First Pluggable Conventions. Pluggable Conventions were previewed in Feature CTP5 but were not at go-live quality for this release. This release still supports the removal of default conventions.
从这里引用: http://blogs.msdn.com/b/ adonet / archive / 2011/03/15 / ef-4-1-release-candidate-available.aspx
这就是为什么添加
不再作为 ConventionsConfiguration
的公共方法存在,只有删除
仍然是可用。
That's why Add
doesn't exist anymore as a public method of ConventionsConfiguration
, only Remove
is still available.
这篇关于实体框架中的可插拔约定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!