Help creating a ColumnName Convention using FluentNHibernate
- by Rafael E. Belliard
I've been trying to specify a custom naming convention for my database table columns. So far, I have been able to setup a convention for the table's name, but not the actual columns. I've seen a few guides on the internet, but they're not working using the latest Fluent NHibernate (1.0.0 RTM).
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?
}
}
Please help.