[fluent-nhib] Re: Automapping convention for CamelCase properties to columns with underscores

2009-05-12 Thread rob
Thanks guys. That's what I did (pretty much). I actually did it inline: James-- what are your thoughts on having a convenience method built-in to handle this scenario since it's a pretty common case? c.Add(ConventionBuilder.Property.Always(x => x.ColumnNames.Add (Inflector.Net.Inflector.Undersco

[fluent-nhib] Re: Automapping convention for CamelCase properties to columns with underscores

2009-05-11 Thread James Gregory
Props to Ramana, that's exactly how I'd do it. On Mon, May 11, 2009 at 9:21 PM, Ramana Kumar wrote: > Create a new Convention class say PascalToUnderscorePropertyConvention that > inherits from IPropertyConvention. See code below. Also, make sure you add > the convention > > using FluentNHibern

[fluent-nhib] Re: Automapping convention for CamelCase properties to columns with underscores

2009-05-11 Thread Ramana Kumar
Create a new Convention class say PascalToUnderscorePropertyConvention that inherits from IPropertyConvention. See code below. Also, make sure you add the convention using FluentNHibernate.Conventions; using FluentNHibernate.Mapping; namespace YourProject.Data.NHibernateMaps.Conventions { cl

[fluent-nhib] Re: Automapping convention for CamelCase properties to columns with underscores

2009-05-11 Thread Hudson Akridge
You could possibly write an actual convention class: http://wiki.fluentnhibernate.org/show/Conventions On Mon, May 11, 2009 at 11:02 AM, rob wrote: > > Hi- > > I want to use what I think is a pretty typical convention for class > properties and database column names. My class properites will