FluentNHibernate FluentNHibernate.Mapping.Builders命名空间 [英] Fluent NHibernate FluentNHibernate.Mapping.Builders Namespace
问题描述
我正在使用通过NuGet检索的最新版本的Fluent NHibernate(1.2.0.712).以前,我曾使用FluentNHibernate.Mapping.Builders命名空间来创建类似于以下内容的映射扩展:
I am using the latest version of Fluent NHibernate (1.2.0.712) retrieved over NuGet. Previously I have used the FluentNHibernate.Mapping.Builders Namespace to create mapping extensions similar to:
public static class MappingExtensions
{
public static PropertyBuilder Text(this PropertyBuilder propertyBuilder)
{
propertyBuilder.Length(10000);
return propertyBuilder;
}
public static PropertyBuilder Money(this PropertyBuilder propertyBuilder)
{
propertyBuilder.CustomType<MoneyUserType>();
return propertyBuilder;
}
}
可以这样使用:
Map(x => x.Price).Money();
我知道收到错误了:
Error 1 The type or namespace name 'Builders' does not exist in the namespace 'FluentNHibernate.Mapping' (are you missing an assembly reference?)
我引用的是正确的程序集.在Reflector和Object Browser中,我找不到上面的名称空间,但是在GitHub的源代码中,它在那里.
I am referencing the correct assembly. In Reflector and Object Browser I can't find the above namespace but in the source code from GitHub it's there.
我缺少明显的东西吗?
推荐答案
此名称空间已被移动,并且某些功能已被重命名/修改.谷歌论坛上的这篇文章可能会或可能不会帮助您.
This namespace has been moved and some of the functionality has been renamed/modified. This post on google groups may or may not help you with this.
http://groups.google.com/group/fluent- nhibernate/browse_thread/thread/5e751b7d49fbf770
这篇关于FluentNHibernate FluentNHibernate.Mapping.Builders命名空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!