2
我一直在试图为我的数据库表列指定一个自定义的命名约定。到目前为止,我已经能够为表格名称设置约定,但不能设置实际的列。我在网上看过一些指南,但他们没有使用最新的Fluent NHibernate(1.0.0 RTM)。帮助使用FluentNHibernate创建ColumnName约定
public class CamelCaseSplitNamingConvention : IClassConvention, IComponentConvention
{
public void Apply(IClassInstance instance)
{
instance.Table(instance.EntityType.Name.ChangeCamelCaseToUnderscore());
}
public void Apply(IComponentInstance instance)
{
// is this the correct call for columns? If not, which one?
}
}
请帮忙。
感谢。它工作完美。 :) – rebelliard 2010-05-14 12:17:00